From d4667d17c5a22fce7d58ca97005c7345d3fdfbc3 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sat, 25 Jun 2011 10:18:40 +0000 Subject: [PATCH] imrpoved shutdown message --- ChangeLog | 3 +++ src/include/defines.h | 1 + src/main.c | 13 +++++++------ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a25ec33eb..10ca03fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2011-06-25 Holger Vogt + * main.c, defines.h: improved shutdown message for Windows GUI + 2011-06-24 Robert Larice * src/main.c , * src/frontend/com_ahelp.c , diff --git a/src/include/defines.h b/src/include/defines.h index 9f4d80af5..f4dd43b0e 100644 --- a/src/include/defines.h +++ b/src/include/defines.h @@ -130,6 +130,7 @@ #define EXIT_NORMAL 0 #define EXIT_BAD 1 +#define EXIT_INFO 2 #define TRUE 1 #define FALSE 0 diff --git a/src/main.c b/src/main.c index b8ad75083..248f0b249 100644 --- a/src/main.c +++ b/src/main.c @@ -486,9 +486,10 @@ sp_shutdown(int exitval) #ifdef HAS_WINDOWS if (exitval == EXIT_BAD) winmessage("Fatal error in SPICE"); - else - winmessage("Information during setup, see text window!"); + else if (exitval == EXIT_INFO) + winmessage("Information during setup, see main window!"); #endif + if (exitval == EXIT_INFO) exitval = EXIT_NORMAL; exit (exitval); } @@ -655,7 +656,7 @@ show_help(void) " -i, --interactive run in interactive mode\n" " -n, --no-spiceinit don't load the local or user's config file\n" " -o, --output=FILE set the outputfile\n" - " -p, --pipe run in I/O pipe mode\n" + " -p, --pipe run in I/O pipe mode\n" " -q, --completion activate command completion\n" " -r, --rawfile=FILE set the rawfile output\n" " -s, --server run spice as a server process\n" @@ -675,7 +676,7 @@ show_version(void) "Currently maintained by the NGSpice Project\n\n" "Copyright (C) 1985-1996," " The Regents of the University of California\n" - "Copyright (C) 1999-2008," + "Copyright (C) 1999-2011," " The NGSpice Project\n", cp_program, PACKAGE, VERSION); } @@ -878,12 +879,12 @@ main(int argc, char **argv) switch (c) { case 'h': /* Help */ show_help(); - sp_shutdown (EXIT_NORMAL); + sp_shutdown (EXIT_INFO); break; case 'v': /* Version info */ show_version(); - sp_shutdown (EXIT_NORMAL); + sp_shutdown (EXIT_INFO); break; case 'b': /* Batch mode */