diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-02-18 22:13:35 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-18 22:13:35 -0800 |
commit | 354152f12f64166699368a6f46628a698b8fa8ca (patch) | |
tree | b138766e99eca47f626daf74e2c59b537d6e2a6a | |
parent | 9a2bc9a4666b0a8789eccd231dd97cf1abc74cae (diff) | |
download | txr-354152f12f64166699368a6f46628a698b8fa8ca.tar.gz txr-354152f12f64166699368a6f46628a698b8fa8ca.tar.bz2 txr-354152f12f64166699368a6f46628a698b8fa8ca.zip |
lisplib: rename to autoload.
* Makefile (OBJS): rename lisplib.o to autoload.o.
* lisplib.c: Renamed to autoload.c.
(lisplib_init_tables): Renamed to autoload_init_tables.
(lisplib_init): Renamed to autoload_init, and calls
autoload_init_tables.
(lisplib_try_load): Renamed to autoload_try.
(autoload_try_fun, autoload_try_var, autloload_try_slot,
autoload_try_struct, autoload_try_keyword): Follow rename.
* lisplib.h: Renamed to autoload.h.
(lisplib_init): Renamed to autoload_init.
* eval.c: Include autoload.h.
(eval_init): Follow rename of lisplib_init.
* gencadr.txr: include "autoload.h"
* cadr.c: Regenerated.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | autoload.c (renamed from lisplib.c) | 20 | ||||
-rw-r--r-- | autoload.h (renamed from lisplib.h) | 2 | ||||
-rw-r--r-- | cadr.c | 2 | ||||
-rw-r--r-- | eval.c | 4 | ||||
-rw-r--r-- | gencadr.txr | 2 |
6 files changed, 16 insertions, 16 deletions
@@ -53,7 +53,7 @@ EXTRA_OBJS-y := OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o OBJS += arith.o hash.o utf8.o filter.o eval.o parser.o rand.o combi.o sysif.o -OBJS += args.o lisplib.o cadr.o struct.o itypes.o buf.o jmp.o protsym.o ffi.o +OBJS += args.o autoload.o cadr.o struct.o itypes.o buf.o jmp.o protsym.o ffi.o OBJS += strudel.o vm.o chksum.o chksums/sha256.o chksums/crc32.o chksums/md5.o OBJS += tree.o time.o psquare.o OBJS += linenoise/linenoise.o @@ -39,7 +39,7 @@ #include "debug.h" #include "txr.h" #include "socket.h" -#include "lisplib.h" +#include "autoload.h" int opt_dbg_autoload; val trace_loaded; @@ -1033,7 +1033,7 @@ val autoload_reg(val (*instantiate)(val), return set_entries(func_f0(func_n1(set_entries), instantiate)); } -static void lisplib_init_tables(void) +static void autoload_init_tables(void) { int i; for (i = 0; i <= al_max; i++) { @@ -1042,9 +1042,9 @@ static void lisplib_init_tables(void) } } -void lisplib_init(void) +void autoload_init(void) { - lisplib_init_tables(); + autoload_init_tables(); autoload_reg(place_instantiate, place_set_entries); autoload_reg(ver_instantiate, ver_set_entries); autoload_reg(ifa_instantiate, ifa_set_entries); @@ -1097,7 +1097,7 @@ void lisplib_init(void) reg_fun(intern(lit("autoload-try-fun"), system_package), func_n1(autoload_try_fun)); } -static val lisplib_try_load(al_ns_t ns, val sym) +static val autoload_try(al_ns_t ns, val sym) { val fun = gethash(autoload_hash[ns], sym); @@ -1117,12 +1117,12 @@ static val lisplib_try_load(al_ns_t ns, val sym) val autoload_try_fun(val sym) { - return lisplib_try_load(al_fun, sym); + return autoload_try(al_fun, sym); } val autoload_try_var(val sym) { - return lisplib_try_load(al_var, sym); + return autoload_try(al_var, sym); } val autoload_try_fun_var(val sym) @@ -1134,15 +1134,15 @@ val autoload_try_fun_var(val sym) val autoload_try_slot(val sym) { - return lisplib_try_load(al_slot, sym); + return autoload_try(al_slot, sym); } val autoload_try_struct(val sym) { - return lisplib_try_load(al_struct, sym); + return autoload_try(al_struct, sym); } val autoload_try_keyword(val sym) { - return lisplib_try_load(al_key, sym); + return autoload_try(al_key, sym); } @@ -31,7 +31,7 @@ typedef enum autoload_ns { } al_ns_t; extern val trace_loaded; -void lisplib_init(void); +void autoload_init(void); val autoload_try_fun(val sym); val autoload_try_var(val sym); val autoload_try_fun_var(val sym); @@ -36,7 +36,7 @@ #include "lib.h" #include "eval.h" #include "stream.h" -#include "lisplib.h" +#include "autoload.h" #include "txr.h" #include "cadr.h" @@ -51,7 +51,7 @@ #include "match.h" #include "txr.h" #include "combi.h" -#include "lisplib.h" +#include "autoload.h" #include "struct.h" #include "cadr.h" #include "filter.h" @@ -7482,7 +7482,7 @@ void eval_init(void) uw_register_subtype(case_error_s, error_s); atexit(run_load_hooks_atexit); - lisplib_init(); + autoload_init(); } void eval_compat_fixup(int compat_ver) diff --git a/gencadr.txr b/gencadr.txr index 20e7b7bb..42a7f435 100644 --- a/gencadr.txr +++ b/gencadr.txr @@ -29,7 +29,7 @@ #include "lib.h" #include "eval.h" #include "stream.h" -#include "lisplib.h" +#include "autoload.h" #include "txr.h" #include "cadr.h" @ (repeat) |