diff options
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/Makefile.in | 2 | ||||
-rw-r--r-- | src/driver/main.c | 1 | ||||
-rw-r--r-- | src/driver/utils.c | 10 | ||||
-rw-r--r-- | src/driver/utils.h | 2 |
4 files changed, 14 insertions, 1 deletions
diff --git a/src/driver/Makefile.in b/src/driver/Makefile.in index 0141482e..4859c829 100644 --- a/src/driver/Makefile.in +++ b/src/driver/Makefile.in @@ -61,7 +61,7 @@ utils.lo: utils.h main.lo: utils.h open-axiom$(EXEEXT): $(open_axiom_objects) - $(LINK) -o $@ $(open_axiom_objects) $(open_axiom_LDADD) + $(LINK) -all-static -o $@ $(open_axiom_objects) $(open_axiom_LDADD) mostlyclean-local: @rm -f $(axiom_objects) diff --git a/src/driver/main.c b/src/driver/main.c index 14762979..a943a95f 100644 --- a/src/driver/main.c +++ b/src/driver/main.c @@ -43,6 +43,7 @@ #include <stdio.h> #include <locale.h> +#include "cfuns.h" #include "utils.h" #define OPENAXIOM_GLOBAL_ENV "AXIOM" diff --git a/src/driver/utils.c b/src/driver/utils.c index 1bf2eccc..1653641f 100644 --- a/src/driver/utils.c +++ b/src/driver/utils.c @@ -403,3 +403,13 @@ openaxiom_execute_core(const openaxiom_command* command, return -1; #endif /* __WIN32__ */ } + + +/* Allocate a vector for ARGC command line arguments. */ +void +openaxiom_allocate_command_argv(openaxiom_command* cmd, int argc) +{ + cmd->core_argc = argc; + cmd->core_argv = (char**) malloc((1 + argc) * sizeof (char*)); + cmd->core_argv[argc] = NULL; +} diff --git a/src/driver/utils.h b/src/driver/utils.h index 30f94912..3f706a88 100644 --- a/src/driver/utils.h +++ b/src/driver/utils.h @@ -80,4 +80,6 @@ void openaxiom_build_rts_options(openaxiom_command*, openaxiom_driver); openaxiom_driver openaxiom_preprocess_arguments(openaxiom_command*, int, char**); +void openaxiom_allocate_command_argv(openaxiom_command*, int); + #endif /* OPENAXIOM_UTILS_INCLUDED */ |