int LexSave = 0; /* last character read by GetChar */
extern int InputLevel; /* # of current macro expansions */
-char *string_token();
-arith char_constant();
+extern char *string_token();
+extern char *strcpy();
+extern arith char_constant();
#define FLG_ESEEN 0x01 /* possibly a floating point number */
#define FLG_DOTSEEN 0x02 /* certainly a floating point number */
again: /* rescan the input after an error or replacement */
ch = GetChar();
-go_on: /* rescan, the following character has been read */
+ /* rescan, the following character has been read */
if ((ch & 0200) && ch != EOI) /* stop on non-ascii character */
fatal("non-ascii '\\%03o' read", ch & 0377);
/* keep track of the place of the token in the file */
ch = quoted(GetChar());
str[pos++] = ch;
if (pos == str_size)
- str = Realloc(str, str_size <<= 1);
+ str = Realloc(str, (unsigned)(str_size <<= 1));
ch = GetChar();
}
str[pos++] = '\0'; /* for filenames etc. */
- str = Realloc(str, pos);
+ str = Realloc(str, (unsigned)pos);
return str;
}
# Special #defines during compilation
CDEFS = $(LIB_INCLUDES)
-CFLAGS = $(CDEFS) $(COPTIONS) -O# # we cannot pass the COPTIONS to lint!
+CFLAGS = $(CDEFS) $(COPTIONS)# # we cannot pass the COPTIONS to lint!
# Grammar files and their objects
LSRC = tokenfile.g expression.g
error("malformed option -D%s", text);
break;
}
- macro_def(str2idf(name, 0), mactext, -1, maclen, NOFLAG);
+ macro_def(str2idf(name, 0), mactext, -1, (int)maclen, NOFLAG);
break;
}
case 'I' : /* -Ipath : insert "path" into include list */
if (++inc_total > inc_max) {
inctable = (char **)
- Realloc(inctable,(inc_max+=10)*sizeof(char *));
+ Realloc((char *)inctable,
+ (unsigned)((inc_max+=10)*sizeof(char *)));
}
for(i = inc_pos++; i < inc_total; i++) {
*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, (unsigned)(size += ITEXTSIZE));
c_ptr = cur_line + size - 1;
}
*c_ptr++ = c;
if (!pragma_nr) {
pragma_tab = (struct prag_info *)Malloc(sizeof(struct prag_info));
} else {
- pragma_tab = (struct prag_info *)Realloc(pragma_tab
- , sizeof(struct prag_info) * (pragma_nr+1));
+ pragma_tab = (struct prag_info *)Realloc((char *)pragma_tab
+ , (unsigned)(sizeof(struct prag_info) * (pragma_nr+1)));
}
pragma_tab[pragma_nr].pr_linnr = LineNumber;
pragma_tab[pragma_nr].pr_fil = FileName;
free(pragma_tab[i].pr_text);
i++;
}
- free(pragma_tab);
+ free((char *) pragma_tab);
pragma_tab = (struct prag_info *)0;
pragma_nr = 0;
LineNumber = LiNo;
#include "replace.h"
extern char *GetIdentifier();
+extern char *strcpy();
+extern char *strcat();
extern int InputLevel;
struct repl *ReplaceList; /* list of currently active macros */
{
register struct repl *nrepl = ReplaceList;
register struct args *ap = nrepl->r_args;
- struct args *args = repl->r_args;
register char *p;
/* stash identifier name */
assert(index < repl->r_size);
if (index + 2 >= repl->r_size) {
- repl->r_text = Realloc(repl->r_text, repl->r_size <<= 1);
+ repl->r_text = Realloc(repl->r_text, (unsigned)(repl->r_size <<= 1));
repl->r_ptr = repl->r_text + index;
}
*repl->r_ptr++ = ch;
assert(index < args->a_expsize);
if (index + 1 >= args->a_expsize) {
args->a_expbuf = Realloc(args->a_expbuf,
- args->a_expsize <<= 1);
+ (unsigned)(args->a_expsize <<= 1));
args->a_expptr = args->a_expbuf + index;
}
*args->a_expptr++ = ch;
assert(index < args->a_rawsize);
if (index + 1 >= args->a_rawsize) {
args->a_rawbuf = Realloc(args->a_rawbuf,
- args->a_rawsize <<= 1);
+ (unsigned)(args->a_rawsize <<= 1));
args->a_rawptr = args->a_rawbuf + index;
}
*args->a_rawptr++ = ch;