formal parameter in this text.
*/
struct macro {
- struct macro *next;
char * mc_text; /* the replacement text */
int mc_nps; /* number of formal parameters */
int mc_length; /* length of replacement text */
if (source) WorkingDir = getwdir(dummy);
preprocess(source);
}
+
+No_Mem() /* called by alloc package */
+{
+ fatal("out of memory");
+}
{
register char *cp = text, *name, *mactext;
- if (class(*cp) != STIDF || class(*cp) == STELL) {
+ if (class(*cp) != STIDF && class(*cp) != STELL) {
error("identifier missing in -D%s", text);
break;
}
*c_ptr = '\0';
while(c != '\n') {
if (c_ptr + 1 - cur_line == size) {
- cur_line = Realloc(cur_line, size + ITEXTSIZE);
+ cur_line = Realloc(cur_line, size += ITEXTSIZE);
c_ptr = cur_line + size - 1;
}
*c_ptr++ = c;
}
UnGetChar();
str = GetIdentifier(0);
- if (str)
- id = str2idf(str, 0);
- else id = 0;
+ if (str) {
+ id = findidf(str);
+ free(str);
+ } else id = 0;
assert(id || class(ch) == STELL);
ch = GetChar();
ch = skipspaces(ch, 0);