[1] | 1 | *** mc.c Tue Nov 24 18:58:43 1987 |
---|
| 2 | --- mc2.c Tue Nov 24 18:51:22 1987 |
---|
| 3 | *************** |
---|
| 4 | *** 1,9 **** |
---|
| 5 | |
---|
| 6 | #define DEBUG error(-1) |
---|
| 7 | |
---|
| 8 | ! /*#include "CCLIB.TXT" |
---|
| 9 | ! */ |
---|
| 10 | ! #include <stdio.h> |
---|
| 11 | |
---|
| 12 | #define INT (-1) |
---|
| 13 | #define CHAR (-2) |
---|
| 14 | --- 1,7 ---- |
---|
| 15 | |
---|
| 16 | #define DEBUG error(-1) |
---|
| 17 | |
---|
| 18 | ! #include "mclib.c" |
---|
| 19 | |
---|
| 20 | #define INT (-1) |
---|
| 21 | #define CHAR (-2) |
---|
| 22 | *************** |
---|
| 23 | *** 147,153 **** |
---|
| 24 | #define GSYMS 450 |
---|
| 25 | #define LSYMS 50 |
---|
| 26 | |
---|
| 27 | ! #define HEAPSIZE 1000 |
---|
| 28 | #define CHEAPSIZE 3000 |
---|
| 29 | #define LBUFSIZE 256 |
---|
| 30 | |
---|
| 31 | --- 145,151 ---- |
---|
| 32 | #define GSYMS 450 |
---|
| 33 | #define LSYMS 50 |
---|
| 34 | |
---|
| 35 | ! #define HEAPSIZE 700 |
---|
| 36 | #define CHEAPSIZE 3000 |
---|
| 37 | #define LBUFSIZE 256 |
---|
| 38 | |
---|
| 39 | *************** |
---|
| 40 | *** 181,187 **** |
---|
| 41 | char *ccout; |
---|
| 42 | if(argc==1) exit(1); |
---|
| 43 | lsrc = chk = asmf = 0; |
---|
| 44 | ! ccout = "c.out"; |
---|
| 45 | ac=argc; |
---|
| 46 | av=argv; |
---|
| 47 | for (ac2=1; (ac2 < ac) && (*av[ac2] == '-'); ++ac2) |
---|
| 48 | --- 179,185 ---- |
---|
| 49 | char *ccout; |
---|
| 50 | if(argc==1) exit(1); |
---|
| 51 | lsrc = chk = asmf = 0; |
---|
| 52 | ! ccout = "C.OUT"; |
---|
| 53 | ac=argc; |
---|
| 54 | av=argv; |
---|
| 55 | for (ac2=1; (ac2 < ac) && (*av[ac2] == '-'); ++ac2) |
---|
| 56 | *************** |
---|
| 57 | *** 201,207 **** |
---|
| 58 | } |
---|
| 59 | fclose(stdout); |
---|
| 60 | if (!chk) |
---|
| 61 | ! if ( (obuf = fopen(ccout,"w")) == NULL ) error(FILERR); |
---|
| 62 | init(); |
---|
| 63 | while(1) |
---|
| 64 | { for (nptr = &ntable[GSYMS],i=LSYMS; i--;) |
---|
| 65 | --- 199,205 ---- |
---|
| 66 | } |
---|
| 67 | fclose(stdout); |
---|
| 68 | if (!chk) |
---|
| 69 | ! if ( (obuf = fopen(ccout,"wc")) == NULL ) error(FILERR); |
---|
| 70 | init(); |
---|
| 71 | while(1) |
---|
| 72 | { for (nptr = &ntable[GSYMS],i=LSYMS; i--;) |
---|
| 73 | *************** |
---|
| 74 | *** 322,328 **** |
---|
| 75 | newfile() |
---|
| 76 | { lineno=0; |
---|
| 77 | fprintf(stderr,"%s:\n",av[ac2]); |
---|
| 78 | ! if ( (filep->fcb = fopen(av[ac2++],"r")) == NULL ) error(FILERR); |
---|
| 79 | } |
---|
| 80 | reserve(s,d) |
---|
| 81 | char *s; |
---|
| 82 | --- 320,326 ---- |
---|
| 83 | newfile() |
---|
| 84 | { lineno=0; |
---|
| 85 | fprintf(stderr,"%s:\n",av[ac2]); |
---|
| 86 | ! if ( (filep->fcb = fopen(av[ac2++],"rc")) == NULL ) error(FILERR); |
---|
| 87 | } |
---|
| 88 | reserve(s,d) |
---|
| 89 | char *s; |
---|
| 90 | *************** |
---|
| 91 | *** 2749,2762 **** |
---|
| 92 | } |
---|
| 93 | FILE *getfname() |
---|
| 94 | {int i; |
---|
| 95 | ! char name[LBUFSIZE]; |
---|
| 96 | getch(); |
---|
| 97 | if(skipspc()!='"') error(INCERR); |
---|
| 98 | for(i=0;(getch()!='"' && ch!='\n');) |
---|
| 99 | ! if(i<LBUFSIZE-1) name[i++]=ch; |
---|
| 100 | if(ch=='\n') error(INCERR); |
---|
| 101 | name[i]=0; |
---|
| 102 | ! return ( (filep+1)->fcb = fopen(name,"r") ); |
---|
| 103 | } |
---|
| 104 | getline() |
---|
| 105 | {int i; |
---|
| 106 | --- 2747,2760 ---- |
---|
| 107 | } |
---|
| 108 | FILE *getfname() |
---|
| 109 | {int i; |
---|
| 110 | ! char name[14]; |
---|
| 111 | getch(); |
---|
| 112 | if(skipspc()!='"') error(INCERR); |
---|
| 113 | for(i=0;(getch()!='"' && ch!='\n');) |
---|
| 114 | ! if(i<13) name[i++]=ch; |
---|
| 115 | if(ch=='\n') error(INCERR); |
---|
| 116 | name[i]=0; |
---|
| 117 | ! return ( (filep+1)->fcb = fopen(name,"rc") ); |
---|
| 118 | } |
---|
| 119 | getline() |
---|
| 120 | {int i; |
---|