#include cc.def/1 extern char mline[], /* Macro line */ line[], /* input stream */ macq[]; /* macro definitions */ extern int eof, /* End of file boolean */ mptr, /* index into mline */ lptr, /* index into line */ macptr, /* index into macq */ output, /* output unit */ cmode; /* Compilation mode C or ASM */ keepch(c) char c; { mline[mptr]=c; if(mptr=mpmax)error("line too long"); lptr=mptr=0; while(line[lptr++]=mline[mptr++]); lptr=0; } /* preprocess */ xlate(c) char c; { int i,j; if(c == 'n') return 13; else if(c == 't') return 9; else if(c == 'b') return 8; else if(c == 'r') return 13; else if(c == 'f') return 12; else if( numeric(c) ) { i = c - '0'; for(j=2; j <= 3; ++j) if(numeric(nch())) i = i * 8 + gch() - '0'; else return i; return i; } else return c; } /* xlate */ addmac() { char sname[namesize]; int k; if(symname(sname)==0) { illname(); kill(); return; } k=0; while(putmac(sname[k++])); while (ch()==' ' | ch()==9) gch(); while(putmac(gch())); if(macptr>=macmax)error("macro table full"); } /* addmac */ putmac(c) char c; { macq[macptr]=c; if(macptr=1) { c=number/k + '0'; if ((c!='0')|(k==1)|(zs)) { zs=1; outbyte(c); } number=number%k; k=k/10; } } /* outdec */