Branch: Tag:

1996-09-22

1996-09-22 19:40:33 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

Pike

Rev: .cvsignore:1.1.1.1
Rev: README:1.1.1.1
Rev: bin/export.pike:1.1.1.1
Rev: bin/fixdepends.sh:1.1.1.1
Rev: bin/hilfe:1.1.1.1
Rev: bin/htmlify_docs.pike:1.1.1.1
Rev: bin/httpd.pike:1.1.1.1
Rev: bin/metatest:1.1.1.1
Rev: bin/mkpeep.pike:1.1.1.1
Rev: bin/rsif:1.1.1.1
Rev: doc/README:1.1.1.1
Rev: doc/builtin/_verify_internals:1.1.1.1
Rev: doc/builtin/add_constant:1.1.1.1
Rev: doc/builtin/aggregage_multiset:1.1.1.1
Rev: doc/builtin/aggregate:1.1.1.1
Rev: doc/builtin/aggregate_mapping:1.1.1.1
Rev: doc/builtin/alarm:1.1.1.1
Rev: doc/builtin/all_constants:1.1.1.1
Rev: doc/builtin/allocate:1.1.1.1
Rev: doc/builtin/arrayp:1.1.1.1
Rev: doc/builtin/backtrace:1.1.1.1
Rev: doc/builtin/call_function:1.1.1.1
Rev: doc/builtin/clone:1.1.1.1
Rev: doc/builtin/column:1.1.1.1
Rev: doc/builtin/combine_path:1.1.1.1
Rev: doc/builtin/compile_file:1.1.1.1
Rev: doc/builtin/compile_string:1.1.1.1
Rev: doc/builtin/copy_value:1.1.1.1
Rev: doc/builtin/crypt:1.1.1.1
Rev: doc/builtin/ctime:1.1.1.1
Rev: doc/builtin/destruct:1.1.1.1
Rev: doc/builtin/equal:1.1.1.1
Rev: doc/builtin/exit:1.1.1.1
Rev: doc/builtin/floatp:1.1.1.1
Rev: doc/builtin/function_name:1.1.1.1
Rev: doc/builtin/function_object:1.1.1.1
Rev: doc/builtin/functionp:1.1.1.1
Rev: doc/builtin/gc:1.1.1.1
Rev: doc/builtin/getpid:1.1.1.1
Rev: doc/builtin/glob:1.1.1.1
Rev: doc/builtin/hash:1.1.1.1
Rev: doc/builtin/indices:1.1.1.1
Rev: doc/builtin/intp:1.1.1.1
Rev: doc/builtin/kill:1.1.1.1
Rev: doc/builtin/localtime:1.1.1.1
Rev: doc/builtin/lower_case:1.1.1.1
Rev: doc/builtin/m_delete:1.1.1.1
Rev: doc/builtin/mappingp:1.1.1.1
Rev: doc/builtin/mkmapping:1.1.1.1
Rev: doc/builtin/multisetp:1.1.1.1
Rev: doc/builtin/next_object:1.1.1.1
Rev: doc/builtin/object_program:1.1.1.1
Rev: doc/builtin/objectp:1.1.1.1
Rev: doc/builtin/programp:1.1.1.1
Rev: doc/builtin/query_host_name:1.1.1.1
Rev: doc/builtin/query_num_arg:1.1.1.1
Rev: doc/builtin/random:1.1.1.1
Rev: doc/builtin/random_seed:1.1.1.1
Rev: doc/builtin/replace:1.1.1.1
Rev: doc/builtin/reverse:1.1.1.1
Rev: doc/builtin/rows:1.1.1.1
Rev: doc/builtin/rusage:1.1.1.1
Rev: doc/builtin/search:1.1.1.1
Rev: doc/builtin/signal:1.1.1.1
Rev: doc/builtin/signame:1.1.1.1
Rev: doc/builtin/signum:1.1.1.1
Rev: doc/builtin/sizeof:1.1.1.1
Rev: doc/builtin/sleep:1.1.1.1
Rev: doc/builtin/sort:1.1.1.1
Rev: doc/builtin/stringp:1.1.1.1
Rev: doc/builtin/this_object:1.1.1.1
Rev: doc/builtin/throw:1.1.1.1
Rev: doc/builtin/time:1.1.1.1
Rev: doc/builtin/trace:1.1.1.1
Rev: doc/builtin/ualarm:1.1.1.1
Rev: doc/builtin/upper_case:1.1.1.1
Rev: doc/builtin/values:1.1.1.1
Rev: doc/builtin/zero_type:1.1.1.1
Rev: doc/index.bmml:1.1.1.1
Rev: doc/manual/example1:1.1.1.1
Rev: doc/manual/example2:1.1.1.1
Rev: doc/manual/example3:1.1.1.1
Rev: doc/manual/tutorial:1.1.1.1
Rev: doc/operators/and:1.1.1.1
Rev: doc/operators/complement:1.1.1.1
Rev: doc/operators/divide:1.1.1.1
Rev: doc/operators/index:1.1.1.1
Rev: doc/operators/is_equal:1.1.1.1
Rev: doc/operators/is_greater_or_equal:1.1.1.1
Rev: doc/operators/is_greater_than:1.1.1.1
Rev: doc/operators/is_lesser_or_equal:1.1.1.1
Rev: doc/operators/is_lesser_than:1.1.1.1
Rev: doc/operators/logical_and:1.1.1.1
Rev: doc/operators/logical_or:1.1.1.1
Rev: doc/operators/minus:1.1.1.1
Rev: doc/operators/modulo:1.1.1.1
Rev: doc/operators/mult:1.1.1.1
Rev: doc/operators/not:1.1.1.1
Rev: doc/operators/not_equal:1.1.1.1
Rev: doc/operators/operators:1.1.1.1
Rev: doc/operators/or:1.1.1.1
Rev: doc/operators/plus:1.1.1.1
Rev: doc/operators/range:1.1.1.1
Rev: doc/operators/shift_left:1.1.1.1
Rev: doc/operators/shift_right:1.1.1.1
Rev: doc/operators/xor:1.1.1.1
Rev: doc/pike/all.bmml:1.1.1.1
Rev: doc/pike/cast:1.1.1.1
Rev: doc/pike/catch:1.1.1.1
Rev: doc/pike/class:1.1.1.1
Rev: doc/pike/command_line_options:1.1.1.1
Rev: doc/pike/control_structures/break:1.1.1.1
Rev: doc/pike/control_structures/catch:1.1.1.1
Rev: doc/pike/control_structures/continue:1.1.1.1
Rev: doc/pike/control_structures/do-while:1.1.1.1
Rev: doc/pike/control_structures/for:1.1.1.1
Rev: doc/pike/control_structures/foreach:1.1.1.1
Rev: doc/pike/control_structures/if-else:1.1.1.1
Rev: doc/pike/control_structures/return:1.1.1.1
Rev: doc/pike/control_structures/switch:1.1.1.1
Rev: doc/pike/control_structures/while:1.1.1.1
Rev: doc/pike/efuns.bmml:1.1.1.1
Rev: doc/pike/functions:1.1.1.1
Rev: doc/pike/gauge:1.1.1.1
Rev: doc/pike/hilfe:1.1.1.1
Rev: doc/pike/how_to_make_modules:1.1.1.1
Rev: doc/pike/inherit:1.1.1.1
Rev: doc/pike/lambda:1.1.1.1
Rev: doc/pike/modifier:1.1.1.1
Rev: doc/pike/preprocessor:1.1.1.1
Rev: doc/pike/reserved.bmml:1.1.1.1
Rev: doc/pike/sscanf:1.1.1.1
Rev: doc/pike/typeof:1.1.1.1
Rev: doc/pike/variables:1.1.1.1
Rev: doc/simulated/PI:1.1.1.1
Rev: doc/simulated/add_efun:1.1.1.1
Rev: doc/simulated/aggregage_list:1.1.1.1
Rev: doc/simulated/all_efuns:1.1.1.1
Rev: doc/simulated/capitalize:1.1.1.1
Rev: doc/simulated/describe_backtrace:1.1.1.1
Rev: doc/simulated/exec:1.1.1.1
Rev: doc/simulated/explode:1.1.1.1
Rev: doc/simulated/file_size:1.1.1.1
Rev: doc/simulated/filter:1.1.1.1
Rev: doc/simulated/filter_array:1.1.1.1
Rev: doc/simulated/get_function:1.1.1.1
Rev: doc/simulated/getenv:1.1.1.1
Rev: doc/simulated/implode:1.1.1.1
Rev: doc/simulated/l_sizeof:1.1.1.1
Rev: doc/simulated/listp:1.1.1.1
Rev: doc/simulated/m_indices:1.1.1.1
Rev: doc/simulated/m_sizeof:1.1.1.1
Rev: doc/simulated/m_values:1.1.1.1
Rev: doc/simulated/map:1.1.1.1
Rev: doc/simulated/map_array:1.1.1.1
Rev: doc/simulated/master:1.1.1.1
Rev: doc/simulated/member_array:1.1.1.1
Rev: doc/simulated/mklist:1.1.1.1
Rev: doc/simulated/mkmultiset:1.1.1.1
Rev: doc/simulated/perror:1.1.1.1
Rev: doc/simulated/popen:1.1.1.1
Rev: doc/simulated/previous_object:1.1.1.1
Rev: doc/simulated/putenv:1.1.1.1
Rev: doc/simulated/read_bytes:1.1.1.1
Rev: doc/simulated/regexp:1.1.1.1
Rev: doc/simulated/search_array:1.1.1.1
Rev: doc/simulated/sort_array:1.1.1.1
Rev: doc/simulated/spawn:1.1.1.1
Rev: doc/simulated/strlen:1.1.1.1
Rev: doc/simulated/strstr:1.1.1.1
Rev: doc/simulated/sum:1.1.1.1
Rev: doc/simulated/sum_arrays:1.1.1.1
Rev: doc/simulated/system:1.1.1.1
Rev: doc/simulated/this_function:1.1.1.1
Rev: doc/simulated/version:1.1.1.1
Rev: doc/simulated/write:1.1.1.1
Rev: doc/simulated/write_file:1.1.1.1
Rev: doc/types/array:1.1.1.1
Rev: doc/types/float:1.1.1.1
Rev: doc/types/function:1.1.1.1
Rev: doc/types/int:1.1.1.1
Rev: doc/types/mapping:1.1.1.1
Rev: doc/types/mixed:1.1.1.1
Rev: doc/types/multiset:1.1.1.1
Rev: doc/types/object:1.1.1.1
Rev: doc/types/program:1.1.1.1
Rev: doc/types/string:1.1.1.1
Rev: lib/include/array.h:1.1.1.1
Rev: lib/include/array.pre.pike:1.1.1.1
Rev: lib/include/process.h:1.1.1.1
Rev: lib/include/process.pre.pike:1.1.1.1
Rev: lib/include/simulate.h:1.1.1.1
Rev: lib/include/simulate.pre.pike:1.1.1.1
Rev: lib/include/stdio.h:1.1.1.1
Rev: lib/include/stdio.pre.pike:1.1.1.1
Rev: lib/master.pike:1.1.1.1
Rev: src/.cvsignore:1.1.1.1
Rev: src/BUGS:1.1.1.1
Rev: src/COPYING:1.1.1.1
Rev: src/COPYRIGHT:1.1.1.1
Rev: src/ChangeLog:1.1.1.1
Rev: src/DISCLAIMER:1.1.1.1
Rev: src/Makefile.src:1.1.1.1
Rev: src/README:1.1.1.1
Rev: src/alloca.c:1.1.1.1
Rev: src/array.c:1.1.1.1
Rev: src/array.h:1.1.1.1
Rev: src/backend.c:1.1.1.1
Rev: src/backend.h:1.1.1.1
Rev: src/build_modlist_h:1.1.1.1
Rev: src/builtin_functions.c:1.1.1.1
Rev: src/builtin_functions.h:1.1.1.1
Rev: src/callback.c:1.1.1.1
Rev: src/callback.h:1.1.1.1
Rev: src/compilation.h:1.1.1.1
Rev: src/config.cache:1.1.1.1
Rev: src/config.h:1.1.1.1
Rev: src/config.log:1.1.1.1
Rev: src/configure.in:1.1.1.1
Rev: src/constants.c:1.1.1.1
Rev: src/constants.h:1.1.1.1
Rev: src/docode.c:1.1.1.1
Rev: src/docode.h:1.1.1.1
Rev: src/dynamic_buffer.c:1.1.1.1
Rev: src/dynamic_buffer.h:1.1.1.1
Rev: src/efun.h:1.1.1.1
Rev: src/error.c:1.1.1.1
Rev: src/error.h:1.1.1.1
Rev: src/fd_control.c:1.1.1.1
Rev: src/fd_control.h:1.1.1.1
Rev: src/fsort.c:1.1.1.1
Rev: src/fsort.h:1.1.1.1
Rev: src/gc.c:1.1.1.1
Rev: src/gc.h:1.1.1.1
Rev: src/global.h:1.1.1.1
Rev: src/hashtable.c:1.1.1.1
Rev: src/hashtable.h:1.1.1.1
Rev: src/install-sh:1.1.1.1
Rev: src/interpret.c:1.1.1.1
Rev: src/interpret.h:1.1.1.1
Rev: src/language.y:1.1.1.1
Rev: src/las.c:1.1.1.1
Rev: src/las.h:1.1.1.1
Rev: src/lex.c:1.1.1.1
Rev: src/lex.h:1.1.1.1
Rev: src/machine.h.in:1.1.1.1
Rev: src/macros.h:1.1.1.1
Rev: src/main.c:1.1.1.1
Rev: src/main.h:1.1.1.1
Rev: src/mapping.c:1.1.1.1
Rev: src/mapping.h:1.1.1.1
Rev: src/memory.c:1.1.1.1
Rev: src/memory.h:1.1.1.1
Rev: src/module.c:1.1.1.1
Rev: src/module.h:1.1.1.1
Rev: src/modules/.cvsignore:1.1.1.1
Rev: src/modules/Makefile.src:1.1.1.1
Rev: src/modules/call_out/.cvsignore:1.1.1.1
Rev: src/modules/call_out/Makefile.src:1.1.1.1
Rev: src/modules/call_out/call_out.c:1.1.1.1
Rev: src/modules/call_out/configure.in:1.1.1.1
Rev: src/modules/call_out/doc/call_out:1.1.1.1
Rev: src/modules/call_out/doc/call_out_info:1.1.1.1
Rev: src/modules/call_out/doc/find_call_out:1.1.1.1
Rev: src/modules/call_out/doc/remove_call_out:1.1.1.1
Rev: src/modules/configure.in:1.1.1.1
Rev: src/modules/files/.cvsignore:1.1.1.1
Rev: src/modules/files/Makefile.src:1.1.1.1
Rev: src/modules/files/configure.in:1.1.1.1
Rev: src/modules/files/datagram.c:1.1.1.1
Rev: src/modules/files/doc/cd:1.1.1.1
Rev: src/modules/files/doc/errno:1.1.1.1
Rev: src/modules/files/doc/exece:1.1.1.1
Rev: src/modules/files/doc/file:1.1.1.1
Rev: src/modules/files/doc/file_stat:1.1.1.1
Rev: src/modules/files/doc/fork:1.1.1.1
Rev: src/modules/files/doc/get_dir:1.1.1.1
Rev: src/modules/files/doc/getcwd:1.1.1.1
Rev: src/modules/files/doc/mkdir:1.1.1.1
Rev: src/modules/files/doc/mv:1.1.1.1
Rev: src/modules/files/doc/port:1.1.1.1
Rev: src/modules/files/doc/rm:1.1.1.1
Rev: src/modules/files/doc/strerror:1.1.1.1
Rev: src/modules/files/doc/werror:1.1.1.1
Rev: src/modules/files/efuns.c:1.1.1.1
Rev: src/modules/files/file.c:1.1.1.1
Rev: src/modules/files/file.h:1.1.1.1
Rev: src/modules/files/file_machine.h.in:1.1.1.1
Rev: src/modules/files/socket.c:1.1.1.1
Rev: src/modules/gdbmmod/.cvsignore:1.1.1.1
Rev: src/modules/gdbmmod/Makefile.src:1.1.1.1
Rev: src/modules/gdbmmod/configure.in:1.1.1.1
Rev: src/modules/gdbmmod/doc/gdbm:1.1.1.1
Rev: src/modules/gdbmmod/gdbm_machine.h.in:1.1.1.1
Rev: src/modules/gdbmmod/gdbmmod.c:1.1.1.1
Rev: src/modules/gmpmod/.cvsignore:1.1.1.1
Rev: src/modules/gmpmod/Makefile.src:1.1.1.1
Rev: src/modules/gmpmod/configure.in:1.1.1.1
Rev: src/modules/gmpmod/doc/mpz:1.1.1.1
Rev: src/modules/gmpmod/gmp_machine.h.in:1.1.1.1
Rev: src/modules/gmpmod/mpz_glue.c:1.1.1.1
Rev: src/modules/image/Makefile.in:1.1.1.1
Rev: src/modules/image/Makefile.src:1.1.1.1
Rev: src/modules/image/configure:1.1.1.1
Rev: src/modules/image/configure.in:1.1.1.1
Rev: src/modules/image/dependencies:1.1.1.1
Rev: src/modules/image/doc.txt:1.1.1.1
Rev: src/modules/image/doc/image.html:1.1.1.1
Rev: src/modules/image/font.c:1.1.1.1
Rev: src/modules/image/image.c:1.1.1.1
Rev: src/modules/image/image.h:1.1.1.1
Rev: src/modules/image/lzw.c:1.1.1.1
Rev: src/modules/image/lzw.h:1.1.1.1
Rev: src/modules/image/quant.c:1.1.1.1
Rev: src/modules/image/togif.c:1.1.1.1
Rev: src/modules/math/.cvsignore:1.1.1.1
Rev: src/modules/math/Makefile.src:1.1.1.1
Rev: src/modules/math/configure.in:1.1.1.1
Rev: src/modules/math/doc/acos:1.1.1.1
Rev: src/modules/math/doc/asin:1.1.1.1
Rev: src/modules/math/doc/atan:1.1.1.1
Rev: src/modules/math/doc/ceil:1.1.1.1
Rev: src/modules/math/doc/cos:1.1.1.1
Rev: src/modules/math/doc/exp:1.1.1.1
Rev: src/modules/math/doc/floor:1.1.1.1
Rev: src/modules/math/doc/log:1.1.1.1
Rev: src/modules/math/doc/pow:1.1.1.1
Rev: src/modules/math/doc/sin:1.1.1.1
Rev: src/modules/math/doc/sqrt:1.1.1.1
Rev: src/modules/math/doc/tan:1.1.1.1
Rev: src/modules/math/math.c:1.1.1.1
Rev: src/modules/module_dir_marker:1.1.1.1
Rev: src/modules/pipe/Makefile.in:1.1.1.1
Rev: src/modules/pipe/Makefile.src:1.1.1.1
Rev: src/modules/pipe/config.h:1.1.1.1
Rev: src/modules/pipe/configure:1.1.1.1
Rev: src/modules/pipe/configure.in:1.1.1.1
Rev: src/modules/pipe/dependencies:1.1.1.1
Rev: src/modules/pipe/pipe.c:1.1.1.1
Rev: src/modules/readlinemod/.cvsignore:1.1.1.1
Rev: src/modules/readlinemod/Makefile.src:1.1.1.1
Rev: src/modules/readlinemod/configure.in:1.1.1.1
Rev: src/modules/readlinemod/doc/readline:1.1.1.1
Rev: src/modules/readlinemod/readline_machine.h.in:1.1.1.1
Rev: src/modules/readlinemod/readlinemod.c:1.1.1.1
Rev: src/modules/regexp/.cvsignore:1.1.1.1
Rev: src/modules/regexp/Makefile.src:1.1.1.1
Rev: src/modules/regexp/configure.in:1.1.1.1
Rev: src/modules/regexp/doc/regexp:1.1.1.1
Rev: src/modules/regexp/glue.c:1.1.1.1
Rev: src/modules/regexp/regexp.c:1.1.1.1
Rev: src/modules/regexp/regexp.h:1.1.1.1
Rev: src/modules/spider/Makefile.in:1.1.1.1
Rev: src/modules/spider/Makefile.src:1.1.1.1
Rev: src/modules/spider/configure:1.1.1.1
Rev: src/modules/spider/configure.in:1.1.1.1
Rev: src/modules/spider/defs.h:1.1.1.1
Rev: src/modules/spider/dependencies:1.1.1.1
Rev: src/modules/spider/discdate.c:1.1.1.1
Rev: src/modules/spider/encode_decode.c:1.1.1.1
Rev: src/modules/spider/http_parse.c:1.1.1.1
Rev: src/modules/spider/lock.c:1.1.1.1
Rev: src/modules/spider/lock.h:1.1.1.1
Rev: src/modules/spider/sdebug.c:1.1.1.1
Rev: src/modules/spider/shared_mem_mapping.c:1.1.1.1
Rev: src/modules/spider/sharedmem.c:1.1.1.1
Rev: src/modules/spider/sharedmem.h:1.1.1.1
Rev: src/modules/spider/spider.c:1.1.1.1
Rev: src/modules/spider/spider.h.in:1.1.1.1
Rev: src/modules/spider/stardate.c:1.1.1.1
Rev: src/modules/spider/streamed_parser.c:1.1.1.1
Rev: src/modules/spider/streamed_parser.h:1.1.1.1
Rev: src/modules/spider/tree.c:1.1.1.1
Rev: src/modules/sprintf/.cvsignore:1.1.1.1
Rev: src/modules/sprintf/Makefile.src:1.1.1.1
Rev: src/modules/sprintf/configure.in:1.1.1.1
Rev: src/modules/sprintf/doc/sprintf:1.1.1.1
Rev: src/modules/sprintf/sprintf.c:1.1.1.1
Rev: src/multiset.c:1.1.1.1
Rev: src/multiset.h:1.1.1.1
Rev: src/object.c:1.1.1.1
Rev: src/object.h:1.1.1.1
Rev: src/opcodes.c:1.1.1.1
Rev: src/opcodes.h:1.1.1.1
Rev: src/operators.c:1.1.1.1
Rev: src/operators.h:1.1.1.1
Rev: src/otable.h:1.1.1.1
Rev: src/peep.c:1.1.1.1
Rev: src/peep.h:1.1.1.1
Rev: src/peep.in:1.1.1.1
Rev: src/pike_types.c:1.1.1.1
Rev: src/pike_types.h:1.1.1.1
Rev: src/port.c:1.1.1.1
Rev: src/port.h:1.1.1.1
Rev: src/program.c:1.1.1.1
Rev: src/program.h:1.1.1.1
Rev: src/run_autoconfig:1.1.1.1
Rev: src/rusage.c:1.1.1.1
Rev: src/rusage.h:1.1.1.1
Rev: src/signal_handler.c:1.1.1.1
Rev: src/signal_handler.h:1.1.1.1
Rev: src/stamp-h:1.1.1.1
Rev: src/stralloc.c:1.1.1.1
Rev: src/stralloc.h:1.1.1.1
Rev: src/stuff.c:1.1.1.1
Rev: src/stuff.h:1.1.1.1
Rev: src/svalue.c:1.1.1.1
Rev: src/svalue.h:1.1.1.1
Rev: src/test/.cvsignore:1.1.1.1
Rev: src/test/create_testsuite:1.1.1.1
Rev: src/test/test_pike.pike:1.1.1.1
Rev: src/time_stuff.h:1.1.1.1
Rev: src/todo:1.1.1.1
Rev: src/types.h:1.1.1.1
Rev: src/ualarm.c:1.1.1.1

1:   /*\ - ||| This file a part of uLPC, and is copyright by Fredrik Hubinette - ||| uLPC is distributed as GPL (General Public License) + ||| This file a part of Pike, and is copyright by Fredrik Hubinette + ||| Pike 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"   #include "dynamic_buffer.h" - #include "lpc_types.h" + #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"
19:   #include "interpret.h"   #include "hashtable.h"   #include "main.h" + #include "gc.h"   #include <stdio.h>   #include <fcntl.h>   
36:   #undef FILE_STATE   #undef PROGRAM_STATE    +  + char *lfun_names[] = { +  "__INIT", +  "create", +  "destroy", +  "`+", +  "`-", +  "`&", +  "`|", +  "`^", +  "`<<", +  "`>>", +  "`*", +  "`/", +  "`%", +  "`~", +  "`==", +  "`<", +  "`>", +  "__hash", +  "cast", +  "`!", +  "`[]", +  "`[]=", + }; +    struct program *first_program = 0;      struct program fake_program;
43:   static int current_program_id=0;   static INT32 last_line = 0;   static INT32 last_pc = 0; - static struct lpc_string *last_file = 0; + static struct pike_string *last_file = 0;   dynamic_buffer inherit_names;      #define HASH_ID_IS_LOCAL 1
69:   {    fake_program.refs=0xffffff;    SETUP(program, program_size, unsigned char, A_PROGRAM); -  SETUP(strings, num_strings, struct lpc_string *, A_STRINGS); +  SETUP(strings, num_strings, struct pike_string *, A_STRINGS);    SETUP(inherits, num_inherits, struct inherit, A_INHERITS);    SETUP(identifiers, num_identifiers, struct identifier, A_IDENTIFIERS);    SETUP(identifier_references, num_identifier_references, struct reference, A_IDENTIFIER_REFERENCES);
95:   {    int e;    struct inherit inherit; -  struct lpc_string *name; +  struct pike_string *name;      #define PROGRAM_STATE   #define PUSH
156:    p->next->prev=p->prev;       free((char *)p); +  +  GC_FREE();   }      #ifdef DEBUG
198:    */   void toss_current_program()   { -  struct lpc_string **names; +  struct pike_string **names;    int e;    setup_fake_program();   
207:    for (e=0; e<NUM_AREAS; e++)    toss_buffer(areas+e);    -  names=(struct lpc_string **)inherit_names.s.str; -  e=inherit_names.s.len / sizeof(struct lpc_string *); +  names=(struct pike_string **)inherit_names.s.str; +  e=inherit_names.s.len / sizeof(struct pike_string *);    for(e--;e>=0;e--) if(names[e]) free_string(names[e]);    toss_buffer(& inherit_names);   }      #ifdef DEBUG - void check_program(struct program *p, int pass) + void check_program(struct program *p)   {    INT32 size,e;    unsigned INT32 checksum;    -  if(pass) -  { -  if(checked((void *)p,0) != p->refs) -  fatal("Program has wrong number of references.\n"); -  -  return; -  } -  +     if(p->refs <=0)    fatal("Program has zero refs.\n");   
252: Inside #if defined(DEBUG)
   size+=MY_ALIGN(p->num_linenumbers);    size+=MY_ALIGN(p->program_size);    size+=MY_ALIGN(p->num_constants * sizeof(struct svalue)); -  size+=MY_ALIGN(p->num_strings * sizeof(struct lpc_string *)); +  size+=MY_ALIGN(p->num_strings * sizeof(struct pike_string *));    size+=MY_ALIGN(p->num_identifiers * sizeof(struct identifier));    size+=MY_ALIGN(p->num_identifier_references * sizeof(struct reference));    size+=MY_ALIGN(p->num_inherits * sizeof(struct inherit));
333:    {    if(p->inherits[e].storage_offset < 0)    fatal("Inherit->storage_offset is wrong.\n"); -  -  checked((void *)p->inherits[e].prog,1); +     } -  checked((void *)p,-1); /* One too many were added above */ +    }   #endif   
362:      struct program *end_program()   { -  struct lpc_string **names; +  struct pike_string **names;    int size, i,e,t;    char *p;    struct program *prog;
374:    if (init_node)    {    union idptr tmp; -  struct lpc_string *s; +  struct pike_string *s;    s=make_shared_string("__INIT");    tmp.offset=PC;    ins_byte(0, A_PROGRAM); /* num args */
383:    define_function(s,    function_type_string,    0, /* ID_STATIC, */ -  IDENTIFIER_LPC_FUNCTION, +  IDENTIFIER_PIKE_FUNCTION,    & tmp);    free_string(s);    }
409:    INS_BLOCK(linenumbers,num_linenumbers,char,A_LINENUMBERS);    INS_BLOCK(identifiers,num_identifiers,struct identifier,A_IDENTIFIERS);    INS_BLOCK(identifier_references,num_identifier_references,struct reference,A_IDENTIFIER_REFERENCES); -  INS_BLOCK(strings,num_strings,struct lpc_string *,A_STRINGS); +  INS_BLOCK(strings,num_strings,struct pike_string *,A_STRINGS);    INS_BLOCK(inherits,num_inherits,struct inherit,A_INHERITS);    INS_BLOCK(constants,num_constants,struct svalue,A_CONSTANTS);   
455:       prog->inherits[0].prog=prog;    -  names=(struct lpc_string **)inherit_names.s.str; -  e=inherit_names.s.len / sizeof(struct lpc_string *); +  names=(struct pike_string **)inherit_names.s.str; +  e=inherit_names.s.len / sizeof(struct pike_string *);    for(e--;e>=0;e--) if(names[e]) free_string(names[e]);    toss_buffer(& inherit_names);   
465:    first_program->prev=prog;    first_program=prog;    +  for(i=0;i<NUM_LFUNS;i++) +  prog->lfuns[i]=find_identifier(lfun_names[i],prog); +    #ifdef DEBUG -  check_program(prog,0); +  check_program(prog);    if(l_flag)    dump_program_desc(prog);   #endif -  +  +  GC_ALLOC();    }       /* Clean up */
526:    * set a callback used to initialize clones of this program    * the init function is called at clone time    */ - void set_init_callback(void (*init)(char *,struct object *)) + void set_init_callback(void (*init)(struct object *))   {    fake_program.init=init;   }
535:    * set a callback used to de-initialize clones of this program    * the exit function is called at destruct    */ - void set_exit_callback(void (*exit)(char *,struct object *)) + void set_exit_callback(void (*exit)(struct object *))   {    fake_program.exit=exit;   }       - int low_reference_inherited_identifier(int e,struct lpc_string *name) + int low_reference_inherited_identifier(int e,struct pike_string *name)   {    struct reference funp;    struct program *p;
575:          - int reference_inherited_identifier(struct lpc_string *super_name, -  struct lpc_string *function_name) + int reference_inherited_identifier(struct pike_string *super_name, +  struct pike_string *function_name)   { -  struct lpc_string **names; +  struct pike_string **names;    int e,i;      #ifdef DEBUG
586:    fatal("reference_inherited_function on nonshared string.\n");   #endif    -  names=(struct lpc_string **)inherit_names.s.str; +  names=(struct pike_string **)inherit_names.s.str;    setup_fake_program();       for(e=fake_program.num_inherits-1;e>0;e--)
612:    return -1;   }    - void rename_last_inherit(struct lpc_string *n) + void rename_last_inherit(struct pike_string *n)   { -  struct lpc_string **names; +  struct pike_string **names;    int e; -  names=(struct lpc_string **)inherit_names.s.str; -  e=inherit_names.s.len / sizeof(struct lpc_string *); +  names=(struct pike_string **)inherit_names.s.str; +  e=inherit_names.s.len / sizeof(struct pike_string *);    free_string(names[e-1]);    copy_shared_string(names[e-1],n);   }
625:   /*    * make this program inherit another program    */ - void do_inherit(struct program *p,INT32 flags, struct lpc_string *name) + void do_inherit(struct program *p,INT32 flags, struct pike_string *name)   {    int e, inherit_offset, storage_offset;    struct inherit inherit; -  struct lpc_string *s; +  struct pike_string *s;       setup_fake_program();   
654:    for (e=0; e < (int)p->num_identifier_references; e++)    {    struct reference fun; -  struct lpc_string *name; +  struct pike_string *name;       fun = p->identifier_references[e]; /* Make a copy */   
669:    my_yyerror("Illegal to redefine 'nomask' function/variable \"%s\"",name->str);    }    +  if(fun.flags & ID_PRIVATE) fun.flags|=ID_HIDDEN; +     if (fun.flags & ID_PUBLIC)    fun.flags |= flags & ~ID_PRIVATE;    else    fun.flags |= flags;    -  if(fun.flags & ID_PRIVATE) fun.flags|=ID_HIDDEN; +     fun.flags |= ID_INHERITED;    add_to_mem_block(A_IDENTIFIER_REFERENCES, (char *)&fun, sizeof fun);    }
694:    }   }    - void simple_do_inherit(struct lpc_string *s, INT32 flags,struct lpc_string *name) + void simple_do_inherit(struct pike_string *s, INT32 flags,struct pike_string *name)   {    reference_shared_string(s);    push_string(s);
721:   /*    * Return the index of the identifier found, otherwise -1.    */ - int isidentifier(struct lpc_string *s) + int isidentifier(struct pike_string *s)   {    INT32 e;    setup_fake_program();
736:   }      /* argument must be a shared string */ - int define_variable(struct lpc_string *name, -  struct lpc_string *type, + int define_variable(struct pike_string *name, +  struct pike_string *type,    INT32 flags)   {    int n;
805:    * define a new function    * if func isn't given, it is supposed to be a prototype.    */ - INT32 define_function(struct lpc_string *name, -  struct lpc_string *type, + INT32 define_function(struct pike_string *name, +  struct pike_string *type,    INT16 flags,    INT8 function_flags,    union idptr *func)
914:    * lookup the number of a function in a program given the name in    * a shared_string    */ - static int low_find_shared_string_identifier(struct lpc_string *name, + static int low_find_shared_string_identifier(struct pike_string *name,    struct program *prog)   {    int max,min,tst;
973: Inside #if defined(FIND_FUNCTION_HASHSIZE)
  #ifdef FIND_FUNCTION_HASHSIZE   struct ff_hash   { -  struct lpc_string *name; +  struct pike_string *name;    int id;    int fun;   };
981:   static struct ff_hash cache[FIND_FUNCTION_HASHSIZE];   #endif    - int find_shared_string_identifier(struct lpc_string *name, + int find_shared_string_identifier(struct pike_string *name,    struct program *prog)   {   #ifdef FIND_FUNCTION_HASHSIZE
1009:      int find_identifier(char *name,struct program *prog)   { -  struct lpc_string *n; +  struct pike_string *n;    if(!prog)    error("Identifier lookup in destructed object.\n");    n=findstring(name);
1017:    return find_shared_string_identifier(n,prog);   }    - int store_prog_string(struct lpc_string *str) + int store_prog_string(struct pike_string *str)   {    unsigned int i; -  struct lpc_string **p; +  struct pike_string **p;    -  p = (struct lpc_string **)areas[A_STRINGS].s.str; +  p = (struct pike_string **)areas[A_STRINGS].s.str;       for (i=0;i<areas[A_STRINGS].s.len / sizeof str;i++)    if (p[i] == str)
1087:    ins_short(a,area);    }else{    ins_signed_byte(-128,area); -  ins_long(a,area); +  ins_int(a,area);    }   }    - void store_linenumber(void) + void store_linenumber(INT32 current_line, struct pike_string *current_file)   {    if(last_line!=current_line || last_file != current_file)    {
1162:    va_start(args,fmt);    VSPRINTF(buf,fmt,args);    -  if(strlen(buf) >= sizeof(buf)) +  if((long)strlen(buf) >= (long)sizeof(buf))    fatal("Buffer overflow in my_yyerror.");       yyerror(buf);
1170:   }      /* -  * Compile an LPC file. Input is supposed to be initalized already. +  * Compile an PIKE file. Input is supposed to be initalized already.    */   void compile()   {
1186:    free_all_local_names();   }    - struct program *compile_file(struct lpc_string *file_name) + struct program *compile_file(struct pike_string *file_name)   {    int fd;    struct program *p;
1196:    error("Couldn't open file '%s'.\n",file_name->str);       +    #define FILE_STATE   #define PUSH   #include "compilation.h"
1216:    return p;   }    - struct program *compile_string(struct lpc_string *prog, -  struct lpc_string *name) + struct program *compile_string(struct pike_string *prog, +  struct pike_string *name)   {    struct program *p;   
1255:      void add_function(char *name,void (*cfun)(INT32),char *type,INT16 flags)   { -  struct lpc_string *name_tmp,*type_tmp; +  struct pike_string *name_tmp,*type_tmp;    union idptr tmp;       name_tmp=make_shared_string(name);
1281:   }      #ifdef DEBUG - void check_all_programs(int pass) + void check_all_programs()   {    struct program *p;    for(p=first_program;p;p=p->next) -  check_program(p,pass); -  - #ifdef FIND_FUNCTION_HASHSIZE -  if(!pass) -  { -  int e; -  for(e=0;e<FIND_FUNCTION_HASHSIZE;e++) -  { -  if(cache[e].name) -  checked((void *)cache[e].name,1); +  check_program(p);   } -  } +    #endif - } - #endif +       void cleanup_program()   {
1315:    }   #endif   } +  + #ifdef GC2 +  + void gc_mark_program_as_referenced(struct program *p) + { +  if(gc_mark(p)) +  gc_mark_svalues(p->constants, p->num_constants); + } +  + void gc_check_all_programs() + { +  struct program *p; +  for(p=first_program;p;p=p->next) +  gc_check_svalues(p->constants, p->num_constants); + } +  + void gc_mark_all_programs() + { +  struct program *p; +  for(p=first_program;p;p=p->next) +  if(gc_is_referenced(p)) +  gc_mark_program_as_referenced(p); + } +  + void gc_free_all_unreferenced_programs() + { +  struct program *p,*next; +  +  for(p=first_program;p;p=next) +  { +  if(gc_do_free(p)) +  { +  p->refs++; +  free_svalues(p->constants, p->num_constants, -1); +  next=p->next; +  free_program(p); +  }else{ +  next=p->next; +  } +  } + } +  + #endif /* GC2 */