Include files modified for compatibility with SmallerC.

Fixed bug in C preprocessor: buffer size reduced to avoid allocation failure.
Added option -v for smlrc.
New example stdarg.c: a demo of function with variable arguments.
This commit is contained in:
Serge Vakulenko
2014-05-02 22:00:30 -07:00
parent 037fc65e93
commit 6f8e71c1b8
14 changed files with 131 additions and 997 deletions

View File

@@ -24,7 +24,7 @@ $(MAN): ${MANSRC}
${MANROFF} $< > $@
clean:
rm -f *.o *.0 *.elf cpp *.elf *.dis tags *~ lex.yy.c y.tab.[ch] tests/run*
rm -f *.o *.0 *.elf cpp *.dis tags *~ lex.yy.c y.tab.[ch] tests/run*
install: all
install cpp $(DESTDIR)/bin/
@@ -41,23 +41,23 @@ cpy.o y.tab.h: cpy.y
$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -o cpy.o y.tab.c
test:
./cpp.elf < tests/test1 > tests/run1
./cpp < tests/test1 > tests/run1
cmp tests/run1 tests/res1
./cpp.elf < tests/test2 > tests/run2
./cpp < tests/test2 > tests/run2
cmp tests/run2 tests/res2
./cpp.elf < tests/test3 > tests/run3
./cpp < tests/test3 > tests/run3
cmp tests/run3 tests/res3
./cpp.elf < tests/test4 > tests/run4
./cpp < tests/test4 > tests/run4
cmp tests/run4 tests/res4
./cpp.elf < tests/test5 > tests/run5
./cpp < tests/test5 > tests/run5
cmp tests/run5 tests/res5
./cpp.elf < tests/test6 > tests/run6
./cpp < tests/test6 > tests/run6
cmp tests/run6 tests/res6
./cpp.elf < tests/test7 > tests/run7
./cpp < tests/test7 > tests/run7
cmp tests/run7 tests/res7
./cpp.elf < tests/test8 > tests/run8
./cpp < tests/test8 > tests/run8
cmp tests/run8 tests/res8
./cpp.elf < tests/test9 > tests/run9
./cpp < tests/test9 > tests/run9
cmp tests/run9 tests/res9
./cpp.elf < tests/test10 > tests/run10
./cpp < tests/test10 > tests/run10
cmp tests/run10 tests/res10