diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2008-09-16 04:42:01 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2008-09-16 04:42:01 +0000 |
| commit | 4dd22860e5bce35a445d7d261ba9e0e53b309bf9 (patch) | |
| tree | e0070d250485932480b6934f8ba9c424c42181d5 /src/main.cpp | |
| parent | minor bug fix in portion(pw,a,b) when b is a cut of pw. (diff) | |
| download | inkscape-4dd22860e5bce35a445d7d261ba9e0e53b309bf9.tar.gz inkscape-4dd22860e5bce35a445d7d261ba9e0e53b309bf9.zip | |
Finish the original command-name addition.
(bzr r6815)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index aac33b155..f8c87b5a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -960,16 +960,14 @@ int sp_main_shell(char const* command_name) if ( strcmp(useme, "quit") == 0 ) { // Time to quit fflush(stdout); - exit(0); + linedata = 0; // mark for exit } else if ( len < 1 ) { // blank string. Do nothing. } else { GError* parseError = 0; gchar** argv = 0; gint argc = 0; - // add a dummy "inkscape" in front, as popt expects the program name there: - gchar *cl = g_strdup_printf ("inkscape %s", useme); - if ( g_shell_parse_argv(cl, &argc, &argv, &parseError) ) { + if ( g_shell_parse_argv(command_line, &argc, &argv, &parseError) ) { poptContext ctx = poptGetContext(NULL, argc, const_cast<const gchar**>(argv), options, 0); poptSetOtherOptionHelp(ctx, _("[OPTIONS...] [FILE...]\n\nAvailable options:")); if ( ctx ) { @@ -984,7 +982,6 @@ int sp_main_shell(char const* command_name) } else { g_warning("problem parsing commandline: %s", useme); } - g_free(cl); } } } // if (linedata... @@ -1021,6 +1018,7 @@ int sp_main_console(int argc, char const **argv) if (sp_shell) { sp_main_shell(argv[0]); // Run as interactive shell + exit(0); } else { sp_process_file_list(fl); // Normal command line invokation } |
