[gnumeric] sstest: move handling of --ext-refs-file to here from main binary.



commit 492b72f25698192e1c0f4965c79c6bd05ac46997
Author: Morten Welinder <terra gnome org>
Date:   Wed Nov 29 18:36:17 2017 -0500

    sstest: move handling of --ext-refs-file to here from main binary.
    
    This isn't strictly for testing, but better here than the main binary.

 src/main-application.c |    9 ---------
 src/sstest.c           |   10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/main-application.c b/src/main-application.c
index 561561c..e0c5017 100644
--- a/src/main-application.c
+++ b/src/main-application.c
@@ -52,7 +52,6 @@ static gboolean gnumeric_no_splash = FALSE;
 static gboolean gnumeric_no_warnings = FALSE;
 static gchar  *func_def_file = NULL;
 static gchar  *func_state_file = NULL;
-static gchar  *ext_refs_file = NULL;
 static gchar  *geometry = NULL;
 static gchar **startup_files;
 
@@ -85,12 +84,6 @@ static const GOptionEntry gnumeric_options [] = {
                N_("FILE")
        },
        {
-               "ext-refs-file", 0,
-               G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &ext_refs_file,
-               N_("Dumps web page for function help"),
-               N_("FILE")
-       },
-       {
                "split-func", 0,
                G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &split_funcdocs,
                N_("Generate new help and po files"),
@@ -285,8 +278,6 @@ main (int argc, char const **argv)
                return gnm_dump_func_defs (func_def_file, 1);
        if (split_funcdocs)
                return gnm_dump_func_defs (NULL, 2);
-       if (ext_refs_file)
-               return gnm_dump_func_defs (ext_refs_file, 4);
 
        if (with_gui) {
                go_component_set_default_command_context (cc = gnm_cmd_context_stderr_new ());
diff --git a/src/sstest.c b/src/sstest.c
index 6ab2e26..346fa8f 100644
--- a/src/sstest.c
+++ b/src/sstest.c
@@ -36,6 +36,7 @@
 
 static gboolean sstest_show_version = FALSE;
 static gboolean sstest_fast = FALSE;
+static gchar *ext_refs_file = NULL;
 static gchar *samples_file = NULL;
 
 static GOptionEntry const sstest_options [] = {
@@ -47,6 +48,13 @@ static GOptionEntry const sstest_options [] = {
        },
 
        {
+               "ext-refs-file", 0,
+               0, G_OPTION_ARG_FILENAME, &ext_refs_file,
+               N_("Dumps web page for function help"),
+               N_("FILE")
+       },
+
+       {
                "samples-file", 0,
                0, G_OPTION_ARG_FILENAME, &samples_file,
                N_("Dumps list of samples in function help"),
@@ -2665,6 +2673,8 @@ main (int argc, char const **argv)
                go_error_info_free (plugin_errs);
        }
 
+       if (ext_refs_file)
+               return gnm_dump_func_defs (ext_refs_file, 4);
        if (samples_file)
                return gnm_dump_func_defs (samples_file, 5);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]