From 251546a2204692c62cb51bee44c3a7601d82b83b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 1 May 2015 19:58:13 -0700 Subject: Move initialization calls to more suitable place. * lib.c (init): Initialize parser, syslog and glob modules here. * txr.c (main): Remove initialization of parser, syslog and glob modules from here. --- ChangeLog | 10 ++++++++++ lib.c | 10 ++++++++++ txr.c | 9 --------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa3af81a..96aee8ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2015-05-01 Kaz Kylheku + + Move initialization calls to more suitable place. + + * lib.c (init): Initialize parser, syslog and glob modules + here. + + * txr.c (main): Remove initialization of parser, syslog and glob + modules from here. + 2015-05-01 Kaz Kylheku * signal.h (sig_save_disable): Bugfix: macro enabling diff --git a/lib.c b/lib.c index 611aef91..6f82063a 100644 --- a/lib.c +++ b/lib.c @@ -57,6 +57,9 @@ #include "eval.h" #include "sysif.h" #include "regex.h" +#include "parser.h" +#include "syslog.h" +#include "glob.h" #include "txr.h" #define max(a, b) ((a) > (b) ? (a) : (b)) @@ -7254,8 +7257,15 @@ void init(const wchar_t *pn, mem_t *(*oom)(mem_t *, size_t), hash_init(); regex_init(); gc_late_init(); + parse_init(); uw_late_init(); less_tab_init(); +#if HAVE_SYSLOG + syslog_init(); +#endif +#if HAVE_GLOB + glob_init(); +#endif gc_state(gc_save); } diff --git a/txr.c b/txr.c index 7a774b69..392fba95 100644 --- a/txr.c +++ b/txr.c @@ -49,8 +49,6 @@ #include "match.h" #include "utf8.h" #include "debug.h" -#include "syslog.h" -#include "glob.h" #include "eval.h" #include "regex.h" #include "arith.h" @@ -303,14 +301,7 @@ int main(int argc, char **argv) progname_u8 = argv[0]; init(progname, oom_realloc_handler, &stack_bottom); match_init(); - parse_init(); debug_init(); -#if HAVE_SYSLOG - syslog_init(); -#endif -#if HAVE_GLOB - glob_init(); -#endif sysroot_init(); return txr_main(argc, argv); } -- cgit v1.2.3