From f6f02d6e7d0c6d3e56ed1181e0d484d2cfd31128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Mon, 16 Oct 1995 18:06:26 +0100 Subject: [PATCH] committing Rev: src/Makefile.in:1.8 Rev: src/alloca.c:1.2 Rev: src/builtin_efuns.c:1.3 Rev: src/call_out.c:1.6 Rev: src/config.h:1.7 Rev: src/configure.in:1.11 Rev: src/interpret.c:1.6 Rev: src/language.y:1.4 Rev: src/lpc_types.c:1.4 Rev: src/lpc_types.h:1.3 Rev: src/modules/files/Makefile.in:1.5 Rev: src/modules/files/file.c:1.6 Rev: src/modules/regexp/Makefile.in:1.5 Rev: src/modules/sprintf/Makefile.in:1.5 Rev: src/program.c:1.4 --- src/Makefile.in | 300 +++++++++++++++++--------------- src/alloca.c | 5 + src/builtin_efuns.c | 2 +- src/call_out.c | 28 +-- src/config.h | 2 +- src/configure.in | 33 ---- src/interpret.c | 24 +-- src/language.y | 4 + src/lpc_types.c | 3 + src/lpc_types.h | 1 + src/modules/files/Makefile.in | 17 +- src/modules/files/file.c | 15 ++ src/modules/regexp/Makefile.in | 8 +- src/modules/sprintf/Makefile.in | 9 +- src/program.c | 5 + 15 files changed, 236 insertions(+), 220 deletions(-) diff --git a/src/Makefile.in b/src/Makefile.in index 556028e429..0d894930e1 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -184,205 +184,217 @@ add_efun.o: add_efun.c add_efun.h svalue.h types.h machine.h \ hashtable.h las.h config.h dynamic_buffer.h program.h macros.h \ memory.h lpc_types.h stralloc.h interpret.h alloca.o: alloca.c -array.o: array.c global.h machine.h config.h port.h types.h svalue.h \ - array.h las.h dynamic_buffer.h program.h object.h stralloc.h \ +array.o: array.c global.h machine.h config.h debug.h types.h port.h \ + svalue.h array.h las.h dynamic_buffer.h program.h object.h stralloc.h \ interpret.h language.h error.h lpc_types.h fsort.h builtin_efuns.h \ memory.h -backend.o: backend.c global.h machine.h config.h port.h types.h \ - interpret.h program.h object.h svalue.h error.h call_out.h backend.h \ - fd_control.h main.h debug.h callback.h array.h las.h dynamic_buffer.h -builtin_efuns.o: builtin_efuns.c global.h machine.h config.h port.h \ - types.h interpret.h program.h svalue.h macros.h memory.h object.h \ - array.h las.h dynamic_buffer.h error.h add_efun.h hashtable.h \ - mapping.h stralloc.h lex.h list.h lpc_types.h rusage.h operators.h \ - fsort.h call_out.h callback.h -call_out.o: call_out.c global.h machine.h config.h port.h types.h \ - array.h las.h svalue.h dynamic_buffer.h program.h call_out.h object.h \ - interpret.h error.h builtin_efuns.h memory.h +backend.o: backend.c global.h machine.h config.h debug.h types.h \ + port.h interpret.h program.h object.h svalue.h error.h call_out.h \ + backend.h fd_control.h main.h callback.h array.h las.h \ + dynamic_buffer.h +builtin_efuns.o: builtin_efuns.c global.h machine.h config.h debug.h \ + types.h port.h interpret.h program.h svalue.h macros.h memory.h \ + object.h array.h las.h dynamic_buffer.h error.h add_efun.h \ + hashtable.h mapping.h stralloc.h lex.h list.h lpc_types.h rusage.h \ + operators.h fsort.h call_out.h callback.h +call_out.o: call_out.c global.h machine.h config.h debug.h types.h \ + port.h array.h las.h svalue.h dynamic_buffer.h program.h call_out.h \ + object.h interpret.h error.h builtin_efuns.h memory.h main.h callback.o: callback.c macros.h memory.h types.h machine.h callback.h \ array.h las.h config.h svalue.h dynamic_buffer.h program.h -debug.o: debug.c global.h machine.h config.h port.h types.h memory.h -docode.o: docode.c global.h machine.h config.h port.h types.h las.h \ - svalue.h dynamic_buffer.h program.h language.h lpc_types.h stralloc.h \ - interpret.h add_efun.h hashtable.h array.h macros.h memory.h error.h \ - main.h lex.h builtin_efuns.h -dynamic_buffer.o: dynamic_buffer.c global.h machine.h config.h port.h \ - types.h dynamic_buffer.h stralloc.h error.h svalue.h memory.h -error.o: error.c global.h machine.h config.h port.h types.h macros.h \ - memory.h error.h svalue.h interpret.h program.h stralloc.h \ +debug.o: debug.c global.h machine.h config.h debug.h types.h port.h \ + memory.h +docode.o: docode.c global.h machine.h config.h debug.h types.h port.h \ + las.h svalue.h dynamic_buffer.h program.h language.h lpc_types.h \ + stralloc.h interpret.h add_efun.h hashtable.h array.h macros.h \ + memory.h error.h main.h lex.h builtin_efuns.h +dynamic_buffer.o: dynamic_buffer.c global.h machine.h config.h debug.h \ + types.h port.h dynamic_buffer.h stralloc.h error.h svalue.h memory.h +error.o: error.c global.h machine.h config.h debug.h types.h port.h \ + macros.h memory.h error.h svalue.h interpret.h program.h stralloc.h \ builtin_efuns.h array.h las.h dynamic_buffer.h object.h fd_control.o: fd_control.c fd_control.h global.h machine.h config.h \ - port.h types.h -fsort.o: fsort.c global.h machine.h config.h port.h types.h fsort.h + debug.h types.h port.h +fsort.o: fsort.c global.h machine.h config.h debug.h types.h port.h \ + fsort.h hashtable.o: hashtable.c hashtable.h types.h machine.h stralloc.h \ config.h stuff.h error.h svalue.h -interpret.o: interpret.c global.h machine.h config.h port.h types.h \ - interpret.h program.h object.h svalue.h array.h las.h \ +interpret.o: interpret.c global.h machine.h config.h debug.h types.h \ + port.h interpret.h program.h object.h svalue.h array.h las.h \ dynamic_buffer.h mapping.h error.h language.h stralloc.h add_efun.h \ hashtable.h macros.h memory.h list.h backend.h operators.h opcodes.h \ main.h lex.h builtin_efuns.h lpc_signal.h -language.o: language.c global.h machine.h config.h port.h \ - interpret.h program.h array.h las.h svalue.h \ +language.o: language.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h array.h las.h svalue.h \ dynamic_buffer.h object.h stralloc.h lex.h lpc_types.h \ add_efun.h hashtable.h macros.h error.h docode.h -las.o: las.c global.h machine.h config.h port.h types.h language.h \ - interpret.h program.h las.h svalue.h dynamic_buffer.h array.h \ - object.h stralloc.h lex.h lpc_types.h add_efun.h hashtable.h \ +las.o: las.c global.h machine.h config.h debug.h types.h port.h \ + language.h interpret.h program.h las.h svalue.h dynamic_buffer.h \ + array.h object.h stralloc.h lex.h lpc_types.h add_efun.h hashtable.h \ mapping.h list.h error.h docode.h main.h memory.h -lex.o: lex.c global.h machine.h config.h port.h types.h language.h \ - array.h las.h svalue.h dynamic_buffer.h program.h lex.h stralloc.h \ - add_efun.h hashtable.h stuff.h memory.h interpret.h error.h object.h \ - operators.h opcodes.h builtin_efuns.h macros.h -list.o: list.c global.h machine.h config.h port.h types.h array.h \ - las.h svalue.h dynamic_buffer.h program.h list.h macros.h memory.h \ - error.h interpret.h builtin_efuns.h -lpc_signal.o: lpc_signal.c global.h machine.h config.h port.h types.h \ - svalue.h interpret.h program.h stralloc.h add_efun.h hashtable.h \ - las.h dynamic_buffer.h macros.h memory.h backend.h -lpc_types.o: lpc_types.c global.h machine.h config.h port.h types.h \ - svalue.h lpc_types.h stralloc.h stuff.h array.h las.h \ +lex.o: lex.c global.h machine.h config.h debug.h types.h port.h \ + language.h array.h las.h svalue.h dynamic_buffer.h program.h lex.h \ + stralloc.h add_efun.h hashtable.h stuff.h memory.h interpret.h \ + error.h object.h operators.h opcodes.h builtin_efuns.h macros.h +list.o: list.c global.h machine.h config.h debug.h types.h port.h \ + array.h las.h svalue.h dynamic_buffer.h program.h list.h macros.h \ + memory.h error.h interpret.h builtin_efuns.h +lpc_signal.o: lpc_signal.c global.h machine.h config.h debug.h types.h \ + port.h svalue.h interpret.h program.h stralloc.h add_efun.h \ + hashtable.h las.h dynamic_buffer.h macros.h memory.h backend.h +lpc_types.o: lpc_types.c global.h machine.h config.h debug.h types.h \ + port.h svalue.h lpc_types.h stralloc.h stuff.h array.h las.h \ dynamic_buffer.h program.h add_efun.h hashtable.h object.h list.h \ mapping.h macros.h memory.h error.h -main.o: main.c global.h machine.h config.h port.h types.h backend.h \ - module.h object.h svalue.h lex.h lpc_types.h builtin_efuns.h array.h \ - las.h dynamic_buffer.h program.h stralloc.h interpret.h error.h \ - macros.h memory.h callback.h lpc_signal.h -mapping.o: mapping.c global.h machine.h config.h port.h types.h \ - mapping.h las.h svalue.h dynamic_buffer.h program.h array.h macros.h \ - memory.h language.h error.h interpret.h -memory.o: memory.c global.h machine.h config.h port.h types.h memory.h \ - error.h svalue.h +main.o: main.c global.h machine.h config.h debug.h types.h port.h \ + backend.h module.h object.h svalue.h lex.h lpc_types.h \ + builtin_efuns.h array.h las.h dynamic_buffer.h program.h stralloc.h \ + interpret.h error.h macros.h memory.h callback.h lpc_signal.h +mapping.o: mapping.c global.h machine.h config.h debug.h types.h \ + port.h mapping.h las.h svalue.h dynamic_buffer.h program.h array.h \ + macros.h memory.h language.h error.h interpret.h +memory.o: memory.c global.h machine.h config.h debug.h types.h port.h \ + memory.h error.h svalue.h module.o: module.c module.h types.h machine.h macros.h memory.h \ error.h svalue.h modlist.h -object.o: object.c global.h machine.h config.h port.h types.h object.h \ - svalue.h dynamic_buffer.h interpret.h program.h stralloc.h macros.h \ - memory.h error.h main.h -opcodes.o: opcodes.c global.h machine.h config.h port.h types.h \ - interpret.h program.h svalue.h array.h las.h dynamic_buffer.h \ +object.o: object.c global.h machine.h config.h debug.h types.h port.h \ + object.h svalue.h dynamic_buffer.h interpret.h program.h stralloc.h \ + macros.h memory.h error.h main.h +opcodes.o: opcodes.c global.h machine.h config.h debug.h types.h \ + port.h interpret.h program.h svalue.h array.h las.h dynamic_buffer.h \ stralloc.h mapping.h list.h opcodes.h object.h error.h lpc_types.h -operators.o: operators.c global.h machine.h config.h port.h types.h \ - interpret.h program.h svalue.h list.h las.h dynamic_buffer.h \ +operators.o: operators.c global.h machine.h config.h debug.h types.h \ + port.h interpret.h program.h svalue.h list.h las.h dynamic_buffer.h \ mapping.h array.h stralloc.h opcodes.h operators.h language.h \ memory.h error.h -port.o: port.c global.h machine.h config.h port.h types.h macros.h \ - memory.h -program.o: program.c global.h machine.h config.h port.h types.h \ - program.h object.h svalue.h dynamic_buffer.h lpc_types.h stralloc.h \ - las.h language.h lex.h macros.h memory.h fsort.h error.h docode.h \ - interpret.h hashtable.h -rusage.o: rusage.c global.h machine.h config.h port.h types.h rusage.h -stralloc.o: stralloc.c global.h machine.h config.h port.h types.h \ - stralloc.h macros.h memory.h dynamic_buffer.h error.h svalue.h +port.o: port.c global.h machine.h config.h debug.h types.h port.h \ + macros.h memory.h +program.o: program.c global.h machine.h config.h debug.h types.h \ + port.h program.h object.h svalue.h dynamic_buffer.h lpc_types.h \ + stralloc.h las.h language.h lex.h macros.h memory.h fsort.h error.h \ + docode.h interpret.h hashtable.h +rusage.o: rusage.c global.h machine.h config.h debug.h types.h port.h \ + rusage.h +stralloc.o: stralloc.c global.h machine.h config.h debug.h types.h \ + port.h stralloc.h macros.h memory.h dynamic_buffer.h error.h svalue.h stuff.o: stuff.c stuff.h types.h machine.h -svalue.o: svalue.c global.h machine.h config.h port.h types.h svalue.h \ - stralloc.h array.h las.h dynamic_buffer.h program.h mapping.h list.h \ - object.h add_efun.h hashtable.h error.h +svalue.o: svalue.c global.h machine.h config.h debug.h types.h port.h \ + svalue.h stralloc.h array.h las.h dynamic_buffer.h program.h \ + mapping.h list.h object.h add_efun.h hashtable.h error.h ualarm.o: ualarm.c add_efun.o: add_efun.c add_efun.h svalue.h types.h machine.h \ hashtable.h las.h config.h dynamic_buffer.h program.h \ macros.h memory.h lpc_types.h stralloc.h interpret.h alloca.o: alloca.c -array.o: array.c global.h machine.h config.h port.h \ - svalue.h array.h las.h dynamic_buffer.h program.h \ +array.o: array.c global.h machine.h config.h debug.h \ + port.h svalue.h array.h las.h dynamic_buffer.h program.h \ object.h stralloc.h interpret.h language.h error.h \ lpc_types.h fsort.h builtin_efuns.h -backend.o: backend.c global.h machine.h config.h port.h \ - interpret.h program.h object.h svalue.h error.h \ - call_out.h backend.h fd_control.h main.h debug.h \ - callback.h array.h las.h dynamic_buffer.h +backend.o: backend.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h object.h svalue.h error.h \ + call_out.h backend.h fd_control.h main.h callback.h \ + array.h las.h dynamic_buffer.h builtin_efuns.o: builtin_efuns.c global.h machine.h config.h \ - port.h interpret.h program.h svalue.h macros.h object.h \ - array.h las.h dynamic_buffer.h error.h add_efun.h \ - hashtable.h mapping.h stralloc.h lex.h list.h lpc_types.h \ - rusage.h operators.h fsort.h call_out.h callback.h -call_out.o: call_out.c global.h machine.h config.h port.h \ - array.h las.h svalue.h dynamic_buffer.h program.h \ - call_out.h object.h interpret.h error.h builtin_efuns.h + debug.h port.h interpret.h program.h svalue.h macros.h \ + object.h array.h las.h dynamic_buffer.h error.h \ + add_efun.h hashtable.h mapping.h stralloc.h lex.h list.h \ + lpc_types.h rusage.h operators.h fsort.h call_out.h \ + callback.h +call_out.o: call_out.c global.h machine.h config.h debug.h \ + port.h array.h las.h svalue.h dynamic_buffer.h program.h \ + call_out.h object.h interpret.h error.h builtin_efuns.h \ + main.h callback.o: callback.c macros.h memory.h types.h machine.h \ callback.h array.h las.h config.h svalue.h \ dynamic_buffer.h program.h -debug.o: debug.c global.h machine.h config.h port.h -docode.o: docode.c global.h machine.h config.h port.h \ - las.h svalue.h dynamic_buffer.h program.h language.h \ - lpc_types.h stralloc.h interpret.h add_efun.h hashtable.h \ - array.h macros.h error.h main.h lex.h builtin_efuns.h +debug.o: debug.c global.h machine.h config.h debug.h \ + port.h +docode.o: docode.c global.h machine.h config.h debug.h \ + port.h las.h svalue.h dynamic_buffer.h program.h \ + language.h lpc_types.h stralloc.h interpret.h add_efun.h \ + hashtable.h array.h macros.h error.h main.h lex.h \ + builtin_efuns.h dynamic_buffer.o: dynamic_buffer.c global.h machine.h config.h \ - port.h dynamic_buffer.h stralloc.h error.h svalue.h -error.o: error.c global.h machine.h config.h port.h \ - macros.h error.h svalue.h interpret.h program.h \ + debug.h port.h dynamic_buffer.h stralloc.h error.h \ + svalue.h +error.o: error.c global.h machine.h config.h debug.h \ + port.h macros.h error.h svalue.h interpret.h program.h \ stralloc.h builtin_efuns.h array.h las.h dynamic_buffer.h \ object.h fd_control.o: fd_control.c fd_control.h global.h machine.h \ - config.h port.h -fsort.o: fsort.c global.h machine.h config.h port.h \ - fsort.h + config.h debug.h port.h +fsort.o: fsort.c global.h machine.h config.h debug.h \ + port.h fsort.h hashtable.o: hashtable.c hashtable.h types.h machine.h \ stralloc.h config.h stuff.h error.h svalue.h -interpret.o: interpret.c global.h machine.h config.h port.h \ - interpret.h program.h object.h svalue.h array.h las.h \ - dynamic_buffer.h mapping.h error.h language.h stralloc.h \ - add_efun.h hashtable.h macros.h list.h backend.h \ - operators.h opcodes.h main.h lex.h builtin_efuns.h \ - lpc_signal.h -language.o: language.c global.h machine.h config.h port.h \ - interpret.h program.h array.h las.h svalue.h \ +interpret.o: interpret.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h object.h svalue.h array.h \ + las.h dynamic_buffer.h mapping.h error.h language.h \ + stralloc.h add_efun.h hashtable.h macros.h list.h \ + backend.h operators.h opcodes.h main.h lex.h \ + builtin_efuns.h lpc_signal.h +language.o: language.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h array.h las.h svalue.h \ dynamic_buffer.h object.h stralloc.h lex.h lpc_types.h \ add_efun.h hashtable.h macros.h error.h docode.h -las.o: las.c global.h machine.h config.h port.h language.h \ - interpret.h program.h las.h svalue.h dynamic_buffer.h \ - array.h object.h stralloc.h lex.h lpc_types.h add_efun.h \ - hashtable.h mapping.h list.h error.h docode.h main.h -lex.o: lex.c global.h machine.h config.h port.h language.h \ - array.h las.h svalue.h dynamic_buffer.h program.h lex.h \ - stralloc.h add_efun.h hashtable.h stuff.h interpret.h \ - error.h object.h operators.h opcodes.h builtin_efuns.h \ - macros.h -list.o: list.c global.h machine.h config.h port.h array.h \ - las.h svalue.h dynamic_buffer.h program.h list.h macros.h \ - error.h interpret.h builtin_efuns.h +las.o: las.c global.h machine.h config.h debug.h port.h \ + language.h interpret.h program.h las.h svalue.h \ + dynamic_buffer.h array.h object.h stralloc.h lex.h \ + lpc_types.h add_efun.h hashtable.h mapping.h list.h \ + error.h docode.h main.h +lex.o: lex.c global.h machine.h config.h debug.h port.h \ + language.h array.h las.h svalue.h dynamic_buffer.h \ + program.h lex.h stralloc.h add_efun.h hashtable.h stuff.h \ + interpret.h error.h object.h operators.h opcodes.h \ + builtin_efuns.h macros.h +list.o: list.c global.h machine.h config.h debug.h port.h \ + array.h las.h svalue.h dynamic_buffer.h program.h list.h \ + macros.h error.h interpret.h builtin_efuns.h lpc_signal.o: lpc_signal.c global.h machine.h config.h \ - port.h svalue.h interpret.h program.h stralloc.h \ + debug.h port.h svalue.h interpret.h program.h stralloc.h \ add_efun.h hashtable.h las.h dynamic_buffer.h macros.h \ backend.h -lpc_types.o: lpc_types.c global.h machine.h config.h port.h \ - svalue.h lpc_types.h stralloc.h stuff.h array.h las.h \ - dynamic_buffer.h program.h add_efun.h hashtable.h object.h \ - list.h mapping.h macros.h error.h -main.o: main.c global.h machine.h config.h port.h \ +lpc_types.o: lpc_types.c global.h machine.h config.h debug.h \ + port.h svalue.h lpc_types.h stralloc.h stuff.h array.h \ + las.h dynamic_buffer.h program.h add_efun.h hashtable.h \ + object.h list.h mapping.h macros.h error.h +main.o: main.c global.h machine.h config.h debug.h port.h \ backend.h module.h object.h svalue.h lex.h lpc_types.h \ builtin_efuns.h array.h las.h dynamic_buffer.h program.h \ stralloc.h interpret.h error.h macros.h callback.h \ lpc_signal.h -mapping.o: mapping.c global.h machine.h config.h port.h \ - mapping.h las.h svalue.h dynamic_buffer.h program.h \ - array.h macros.h language.h error.h interpret.h -memory.o: memory.c global.h machine.h config.h port.h \ - error.h svalue.h +mapping.o: mapping.c global.h machine.h config.h debug.h \ + port.h mapping.h las.h svalue.h dynamic_buffer.h \ + program.h array.h macros.h language.h error.h interpret.h +memory.o: memory.c global.h machine.h config.h debug.h \ + port.h error.h svalue.h module.o: module.c module.h types.h machine.h macros.h \ memory.h error.h svalue.h modlist.h -object.o: object.c global.h machine.h config.h port.h \ - object.h svalue.h dynamic_buffer.h interpret.h program.h \ - stralloc.h macros.h error.h main.h -opcodes.o: opcodes.c global.h machine.h config.h port.h \ - interpret.h program.h svalue.h array.h las.h \ +object.o: object.c global.h machine.h config.h debug.h \ + port.h object.h svalue.h dynamic_buffer.h interpret.h \ + program.h stralloc.h macros.h error.h main.h +opcodes.o: opcodes.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h svalue.h array.h las.h \ dynamic_buffer.h stralloc.h mapping.h list.h opcodes.h \ object.h error.h lpc_types.h -operators.o: operators.c global.h machine.h config.h port.h \ - interpret.h program.h svalue.h list.h las.h \ +operators.o: operators.c global.h machine.h config.h debug.h \ + port.h interpret.h program.h svalue.h list.h las.h \ dynamic_buffer.h mapping.h array.h stralloc.h opcodes.h \ operators.h language.h error.h -port.o: port.c global.h machine.h config.h port.h macros.h -program.o: program.c global.h machine.h config.h port.h \ - program.h object.h svalue.h dynamic_buffer.h lpc_types.h \ - stralloc.h las.h language.h lex.h macros.h fsort.h \ - error.h docode.h interpret.h hashtable.h -rusage.o: rusage.c global.h machine.h config.h port.h \ - rusage.h -stralloc.o: stralloc.c global.h machine.h config.h port.h \ - stralloc.h macros.h dynamic_buffer.h error.h svalue.h +port.o: port.c global.h machine.h config.h debug.h port.h \ + macros.h +program.o: program.c global.h machine.h config.h debug.h \ + port.h program.h object.h svalue.h dynamic_buffer.h \ + lpc_types.h stralloc.h las.h language.h lex.h macros.h \ + fsort.h error.h docode.h interpret.h hashtable.h +rusage.o: rusage.c global.h machine.h config.h debug.h \ + port.h rusage.h +stralloc.o: stralloc.c global.h machine.h config.h debug.h \ + port.h stralloc.h macros.h dynamic_buffer.h error.h \ + svalue.h stuff.o: stuff.c stuff.h types.h machine.h -svalue.o: svalue.c global.h machine.h config.h port.h \ - svalue.h stralloc.h array.h las.h dynamic_buffer.h \ +svalue.o: svalue.c global.h machine.h config.h debug.h \ + port.h svalue.h stralloc.h array.h las.h dynamic_buffer.h \ program.h mapping.h list.h object.h add_efun.h \ hashtable.h error.h ualarm.o: ualarm.c diff --git a/src/alloca.c b/src/alloca.c index caa7212a34..092c2ce10b 100644 --- a/src/alloca.c +++ b/src/alloca.c @@ -1,3 +1,8 @@ +/*\ +||| This file a part of uLPC, and is copyright by Fredrik Hubinette +||| uLPC is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ #include <stdio.h> /* alloca -- (mostly) portable public-domain implementation -- D A Gwyn diff --git a/src/builtin_efuns.c b/src/builtin_efuns.c index 33aa6ccf45..1100632102 100644 --- a/src/builtin_efuns.c +++ b/src/builtin_efuns.c @@ -180,7 +180,7 @@ void f_random_seed(INT32 args) error("Bad argument 1 to random_seed()\n"); my_srand(sp[-args].u.integer); - pop_n_elems(args-1); + pop_n_elems(args); } void f_query_num_arg(INT32 args) diff --git a/src/call_out.c b/src/call_out.c index 53de8d53a0..a608d47766 100644 --- a/src/call_out.c +++ b/src/call_out.c @@ -13,6 +13,7 @@ #include "error.h" #include "builtin_efuns.h" #include "memory.h" +#include "main.h" call_out **pending_calls=0; /* pointer to first busy pointer */ int num_pending_calls; /* no of busy pointers in buffer */ @@ -26,7 +27,9 @@ static void verify_call_outs() #ifdef DEBUG struct array *v; int e; - if(call_buffer) return; + + if(!d_flag) return; + if(!call_buffer) return; if(num_pending_calls<0 || num_pending_calls>call_buffer_size) fatal("Error in call out tables.\n"); @@ -38,7 +41,7 @@ static void verify_call_outs() { if(e) { - if(pending_calls[e-1]>pending_calls[e]) + if(pending_calls[e-1]->time>pending_calls[e]->time) fatal("Error in call out order.\n"); } @@ -111,19 +114,17 @@ static int new_call_out(int num_arg,struct svalue *argp) /* time to link it into the buffer using binsearch */ pos=pending_calls; - if(new->time>current_time+1) /* do we need to search where ?*/ + + e=num_pending_calls; + while(e>0) { - e=num_pending_calls; - while(e>0) + c=e/2; + if(new->time>pos[c]->time) { - c=e/2; - if(new->time>pos[c]->time) - { - pos+=c+1; - e-=c+1; - }else{ - e=c; - } + pos+=c+1; + e-=c+1; + }else{ + e=c; } } pos--; @@ -132,6 +133,7 @@ static int new_call_out(int num_arg,struct svalue *argp) *pos=new; num_pending_calls++; + verify_call_outs(); return 1; } diff --git a/src/config.h b/src/config.h index 33ec34fff1..15c903eba4 100644 --- a/src/config.h +++ b/src/config.h @@ -11,7 +11,7 @@ * with DEBUG defined debugging becomes much easier. */ -#undef DEBUG +#define DEBUG /* * Define the evaluator stack size, used for just about everything. diff --git a/src/configure.in b/src/configure.in index 0cf9d21777..a0b960d7d6 100644 --- a/src/configure.in +++ b/src/configure.in @@ -317,39 +317,6 @@ lpc_cv_hardware_byteorder=0 AC_MSG_RESULT($lpc_cv_hardware_byteorder) AC_DEFINE_UNQUOTED(BYTEORDER,$lpc_cv_hardware_byteorder) -AC_MSG_CHECKING(unaligned read/writes) -AC_CACHE_VAL(lpc_cv_hardware_unalignedRW, -[ -if test -x /usr/bin/uac ; then - /usr/bin/uac p sigbus -fi - -AC_TRY_RUN([ -int main() -{ - char *c; -#ifdef __alpha - return 1; -#endif - c=(char *)malloc(100); - - *((int *)(c+0))=0x1243abcd; - if(*((int *)(c+0))!=0x1243abcd) return 1; - *((int *)(c+1))=0x1243abcd; - if(*((int *)(c+1))!=0x1243abcd) return 1; - *((int *)(c+2))=0x1243abcd; - if(*((int *)(c+2))!=0x1243abcd) return 1; - *((int *)(c+3))=0x1243abcd; - if(*((int *)(c+3))!=0x1243abcd) return 1; - *((short *)(c+1))=0x1243; - if(*((short *)(c+1))!=0x1243) return 1; - *((short *)(c+0))=0x1243; - if(*((short *)(c+0))!=0x1243) return 1; - return 0; -}], -lpc_cv_hardware_unalignedRW=yes, -lpc_cv_hardware_unalignedRW=no)]) - AC_MSG_CHECKING(for working memmem) AC_CACHE_VAL(lpc_cv_func_memmem, [ diff --git a/src/interpret.c b/src/interpret.c index 5a88707f1e..36e853843a 100644 --- a/src/interpret.c +++ b/src/interpret.c @@ -1155,19 +1155,7 @@ void strict_apply_svalue(struct svalue *s, INT32 args) case T_FUNCTION: if(s->subtype == -1) { - struct svalue *expected_sp=sp-args+1; (*(s->u.efun->function))(args); - if(sp > expected_sp) - { - pop_n_elems(sp-expected_sp); - } - else if(sp < expected_sp) - { - push_int(0); - } -#ifdef DEBUG - if(sp < expected_sp) fatal("Stack underflow!\n"); -#endif }else{ apply_low(s->u.object, s->subtype, args); } @@ -1216,7 +1204,19 @@ void apply_svalue(struct svalue *s, INT32 args) pop_n_elems(args); push_int(0); }else{ + struct svalue *expected_sp=sp-args+1; strict_apply_svalue(s,args); + if(sp > expected_sp) + { + pop_n_elems(sp-expected_sp); + } + else if(sp < expected_sp) + { + push_int(0); + } +#ifdef DEBUG + if(sp < expected_sp) fatal("Stack underflow!\n"); +#endif } } diff --git a/src/language.y b/src/language.y index fdcbf16205..ad711c7416 100644 --- a/src/language.y +++ b/src/language.y @@ -594,6 +594,10 @@ lambda: F_LAMBDA { push_locals(); $<number>$=comp_stackp; + + if(local_variables->current_return_type) + free_string(local_variables->current_return_type); + copy_shared_string(local_variables->current_return_type,any_type_string); } '(' arguments ')' block { diff --git a/src/lpc_types.c b/src/lpc_types.c index 90edb928a4..cad91651f8 100644 --- a/src/lpc_types.c +++ b/src/lpc_types.c @@ -48,6 +48,7 @@ struct lpc_string *list_type_string; struct lpc_string *mapping_type_string; struct lpc_string *mixed_type_string; struct lpc_string *void_type_string; +struct lpc_string *any_type_string; void init_types() { @@ -62,6 +63,7 @@ void init_types() mapping_type_string=parse_type("mapping"); function_type_string=parse_type("function"); void_type_string=parse_type("void"); + any_type_string=parse_type("void|mixed"); } static int type_length(char *t) @@ -856,4 +858,5 @@ void cleanup_lpc_types() free_string(mapping_type_string); free_string(mixed_type_string); free_string(void_type_string); + free_string(any_type_string); } diff --git a/src/lpc_types.h b/src/lpc_types.h index d3984bb4b4..01ef149734 100644 --- a/src/lpc_types.h +++ b/src/lpc_types.h @@ -17,6 +17,7 @@ extern struct lpc_string *list_type_string; extern struct lpc_string *mapping_type_string; extern struct lpc_string *mixed_type_string; extern struct lpc_string *void_type_string; +extern struct lpc_string *any_type_string; /* Prototypes begin here */ void init_types(); diff --git a/src/modules/files/Makefile.in b/src/modules/files/Makefile.in index caa0322759..c4d9cd0753 100644 --- a/src/modules/files/Makefile.in +++ b/src/modules/files/Makefile.in @@ -20,18 +20,19 @@ depend: datagram.o: datagram.c efuns.o: efuns.c global.h machine.h config.h \ - port.h interpret.h program.h svalue.h \ - stralloc.h array.h las.h \ + debug.h port.h interpret.h program.h \ + svalue.h stralloc.h array.h las.h \ dynamic_buffer.h mapping.h macros.h \ fd_control.h file_machine.h file.o: file.c global.h machine.h config.h \ - port.h interpret.h program.h svalue.h \ - stralloc.h array.h las.h \ + debug.h port.h interpret.h program.h \ + svalue.h stralloc.h array.h las.h \ dynamic_buffer.h object.h macros.h \ backend.h fd_control.h file_machine.h file.h \ error.h lpc_signal.h socket.o: socket.c global.h machine.h \ - config.h port.h interpret.h program.h \ - svalue.h stralloc.h array.h las.h \ - dynamic_buffer.h object.h macros.h \ - backend.h fd_control.h file_machine.h file.h + config.h debug.h port.h interpret.h \ + program.h svalue.h stralloc.h array.h \ + las.h dynamic_buffer.h object.h \ + macros.h backend.h fd_control.h \ + file_machine.h file.h diff --git a/src/modules/files/file.c b/src/modules/files/file.c index 8f840142c7..0f84c190ad 100644 --- a/src/modules/files/file.c +++ b/src/modules/files/file.c @@ -588,6 +588,20 @@ static void file_set_blocking(INT32 args) pop_n_elems(args); } +static void file_set_close_on_exec(INT32 args) +{ + if(THIS->fd <0) + error("File not open.\n"); + + if(IS_ZERO(sp-args)) + { + set_close_on_exec(THIS->fd,0); + }else{ + set_close_on_exec(THIS->fd,1); + } + pop_n_elems(args-1); +} + static void file_set_id(INT32 args) { if(args < 1) @@ -1168,6 +1182,7 @@ void init_files_programs() add_function("stat",file_stat,"function(:int *)",0); add_function("errno",file_errno,"function(:int)",0); + add_function("set_close_on_exec",file_set_close_on_exec,"function(int:void)",0); add_function("set_nonblocking",file_set_nonblocking,"function(mixed,mixed,mixed:void)",0); add_function("set_blocking",file_set_blocking,"function(:void)",0); add_function("set_id",file_set_id,"function(mixed:void)",0); diff --git a/src/modules/regexp/Makefile.in b/src/modules/regexp/Makefile.in index 8b9dee0373..ae6add15b6 100644 --- a/src/modules/regexp/Makefile.in +++ b/src/modules/regexp/Makefile.in @@ -19,9 +19,9 @@ depend: config.status glue.o: glue.c global.h machine.h config.h \ - port.h interpret.h program.h svalue.h \ - stralloc.h array.h las.h \ + debug.h port.h interpret.h program.h \ + svalue.h stralloc.h array.h las.h \ dynamic_buffer.h object.h macros.h regexp.o: regexp.c global.h machine.h \ - config.h port.h regexp.h error.h \ - svalue.h + config.h debug.h port.h regexp.h \ + error.h svalue.h diff --git a/src/modules/sprintf/Makefile.in b/src/modules/sprintf/Makefile.in index 3d8ca925e5..16470c012e 100644 --- a/src/modules/sprintf/Makefile.in +++ b/src/modules/sprintf/Makefile.in @@ -20,7 +20,8 @@ depend: sprintf.o: sprintf.c global.h machine.h \ - config.h port.h error.h svalue.h \ - array.h las.h dynamic_buffer.h \ - program.h stralloc.h lpc_types.h \ - add_efun.h hashtable.h interpret.h + config.h debug.h port.h error.h \ + svalue.h array.h las.h \ + dynamic_buffer.h program.h stralloc.h \ + lpc_types.h add_efun.h hashtable.h \ + interpret.h diff --git a/src/program.c b/src/program.c index 22106185b2..3cb3d256be 100644 --- a/src/program.c +++ b/src/program.c @@ -1,3 +1,8 @@ +/*\ +||| This file a part of uLPC, and is copyright by Fredrik Hubinette +||| uLPC is distributed as GPL (General Public License) +||| See the files COPYING and DISCLAIMER for more information. +\*/ #include "global.h" #include "program.h" #include "object.h" -- GitLab