Removed # in commands, changed mechanism for computing mem used

This commit is contained in:
ceriel 1992-06-26 12:47:07 +00:00
parent 50e8baa624
commit 44a1c5620c
3 changed files with 7 additions and 4 deletions

View file

@ -9,6 +9,8 @@ static char rcsid[]= "$Header$";
#include <stdio.h>
char *filename;
char *beg_sbrk;
extern char *sbrk();
main(argc,argv) char **argv; {
extern int nerrors;
@ -16,6 +18,8 @@ main(argc,argv) char **argv; {
extern int tabledebug;
extern int verbose;
beg_sbrk = sbrk(0);
while (argc >1 && argv[1][0]=='-') {
switch(argv[1][1]) {
case 'c':

View file

@ -891,7 +891,7 @@ used(resource,use,max) char *resource; {
}
statistics() {
extern char *end,*sbrk();
extern char *beg_sbrk,*sbrk();
extern int nnodes, maxempatlen,maxrule;
used("Registers",nregs,MAXREGS);
@ -915,5 +915,5 @@ statistics() {
used("Pat bytes",npatbytes+1,MAXPATBYTES);
if (tabledebug)
used("Source lines",maxline,MAXSOURCELINES);
fprintf(stderr,"%ldK heap used\n",((long) (sbrk(0)-(char *) &end+1023))/1024);
fprintf(stderr,"%ldK heap used\n",((long) (sbrk(0)-beg_sbrk+1023))/1024);
}

View file

@ -71,8 +71,7 @@ opr:
-make pr|opr
depend: $(CFILES) scan.c
sed '/^#DEPENDENCIES/,$$d' Makefile >Makefile.new
echo '#DEPENDENCIES' >>Makefile.new
rm_deps Makefile >Makefile.new
for i in $(CFILES) ; do \
echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \