summaryrefslogtreecommitdiffhomepage
path: root/mixguile
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-28 23:10:45 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2001-09-28 23:10:45 +0000
commit8436c3e502103028e48b9a5165ea3d8ee60c48e0 (patch)
tree5b7606f428840addd23ff995d37deb5ea839342d /mixguile
parentb5127ef19ab31dd9de9fb62aa8dab3b815ef382d (diff)
downloadmdk-8436c3e502103028e48b9a5165ea3d8ee60c48e0.tar.gz
mdk-8436c3e502103028e48b9a5165ea3d8ee60c48e0.tar.bz2
uniform command line options handling
Diffstat (limited to 'mixguile')
-rw-r--r--mixguile/mixguile.c8
-rw-r--r--mixguile/mixguile.h4
-rw-r--r--mixguile/mixguile_main.c7
3 files changed, 8 insertions, 11 deletions
diff --git a/mixguile/mixguile.c b/mixguile/mixguile.c
index 482832a..2f1ae48 100644
--- a/mixguile/mixguile.c
+++ b/mixguile/mixguile.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixguile.c :
* Implementation of the functions declared in mixguile.h
* ------------------------------------------------------------------
- * $Id: mixguile.c,v 1.5 2001/09/24 23:27:42 jao Exp $
+ * $Id: mixguile.c,v 1.6 2001/09/28 23:10:45 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -40,7 +40,7 @@ real_main_ (int argc, char *argv[])
if (vm_dispatcher_)
{
mixguile_set_cmd_dispatcher (vm_dispatcher_);
- mixguile_load_bootstrap ();
+ mixguile_load_bootstrap (init_file_);
}
(*main_fun_)(argc, argv);
}
@@ -62,7 +62,7 @@ mixguile_init (int argc, char *argv[], gboolean initfile,
/* load bootstrap file */
void
-mixguile_load_bootstrap (void)
+mixguile_load_bootstrap (gboolean loadlocal)
{
const gchar *scmfile = SCM_FILE;
gchar *lscmfile = g_strconcat (g_get_home_dir (), G_DIR_SEPARATOR_S,
@@ -77,7 +77,7 @@ mixguile_load_bootstrap (void)
else
mixguile_interpret_file (scmfile);
- if (init_file_ && !access (lscmfile, R_OK))
+ if (loadlocal && !access (lscmfile, R_OK))
{
mixguile_interpret_file (lscmfile);
}
diff --git a/mixguile/mixguile.h b/mixguile/mixguile.h
index 469f455..7a29062 100644
--- a/mixguile/mixguile.h
+++ b/mixguile/mixguile.h
@@ -1,7 +1,7 @@
/* -*-c-*- ---------------- mixguile.h :
* Interface to the mixguile interpreter.
* ------------------------------------------------------------------
- * $Id: mixguile.h,v 1.4 2001/09/24 23:27:42 jao Exp $
+ * $Id: mixguile.h,v 1.5 2001/09/28 23:10:45 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -38,7 +38,7 @@ typedef void (*main_func_t) (int argc, char *argv[]);
/* load mixguile startup file */
extern void
-mixguile_load_bootstrap ();
+mixguile_load_bootstrap (gboolean localinit);
/*
initialise the guile command dispatcher and enter the provided
diff --git a/mixguile/mixguile_main.c b/mixguile/mixguile_main.c
index fca0664..c230131 100644
--- a/mixguile/mixguile_main.c
+++ b/mixguile/mixguile_main.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixguile_main.c :
* Main function for mixguile, the MIX Guile shell
* ------------------------------------------------------------------
- * $Id: mixguile_main.c,v 1.4 2001/09/24 23:28:03 jao Exp $
+ * $Id: mixguile_main.c,v 1.5 2001/09/28 23:10:45 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -53,7 +53,6 @@ main (int argc, char *argv[])
mix_vm_cmd_dispatcher_t *dis;
int c;
- const char *prog_name = argv[0];
gboolean initfile = TRUE;
setlocale (LC_ALL, "");
@@ -74,9 +73,7 @@ main (int argc, char *argv[])
switch (c)
{
case VER_OPT:
- fprintf (stderr, _("%s %s, Scheme MIX Virtual Machine.\n"),
- prog_name, VERSION);
- fprintf (stderr, MIX_GPL_LICENSE);
+ mix_print_license ("mixguile, Scheme MIX Virtual Machine");
return EXIT_SUCCESS;
case NOINIT_OPT:
initfile = FALSE;