aboutsummaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-09-30 04:40:18 +0000
committerdos-reis <gdr@axiomatics.org>2009-09-30 04:40:18 +0000
commit505e209e5bc209a9ee7518da0f70124d25572789 (patch)
treef5cd9c203ba8a5a865f66afadd204a94f0d09474 /src/driver
parent808c5e28c0e8bc7a397eb2ffd1e77ee7a53061a6 (diff)
downloadopen-axiom-505e209e5bc209a9ee7518da0f70124d25572789.tar.gz
* sman/sman.c (fix_env): Simplify.
(exec_command_env): Lose second parameter. (fork_Axiom): Take a new parameter. (start_the_Axiom): Adjust. (main): Likewise. * interp/int-top.boot (printFirstPrompt?): New. (SpadInterpretStream): Use it. * driver/utils.h (openaxiom_allocate_command_argv): Declare. * driver/utils.c (openaxiom_allocate_command_argv): Define. * driver/Makefile.in (open-axiom$(EXEEXT)): Link statically.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/Makefile.in2
-rw-r--r--src/driver/main.c1
-rw-r--r--src/driver/utils.c10
-rw-r--r--src/driver/utils.h2
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 */