aboutsummaryrefslogtreecommitdiff
path: root/src/driver/utils.c
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/utils.c
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/utils.c')
-rw-r--r--src/driver/utils.c10
1 files changed, 10 insertions, 0 deletions
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;
+}