[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/ui/terminal main.c ChangeLog
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src/ui/terminal main.c ChangeLog |
Date: |
Tue, 25 Apr 2006 16:41:33 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Branch:
Changes by: Ben Pfaff <address@hidden> 06/04/25 16:41:33
Modified files:
src/ui/terminal: main.c ChangeLog
Log message:
* main.c: (terminate) Mark static and NO_RETURN. If called
recursively, which can only happen via signal, just exit instead of
trying to gracefully shut down.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ui/terminal/main.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ui/terminal/ChangeLog.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: pspp/src/ui/terminal/ChangeLog
diff -u pspp/src/ui/terminal/ChangeLog:1.3 pspp/src/ui/terminal/ChangeLog:1.4
--- pspp/src/ui/terminal/ChangeLog:1.3 Fri Mar 31 18:34:19 2006
+++ pspp/src/ui/terminal/ChangeLog Tue Apr 25 16:41:33 2006
@@ -1,3 +1,9 @@
+Tue Apr 25 09:39:46 2006 Ben Pfaff <address@hidden>
+
+ * main.c: (terminate) Mark static and NO_RETURN. If called
+ recursively, which can only happen via signal, just exit instead
+ of trying to gracefully shut down.
+
Fri Mar 31 10:33:37 2006 Ben Pfaff <address@hidden>
* command-line.c: (var pre_syntax_message) -d and -u are no longer
Index: pspp/src/ui/terminal/main.c
diff -u pspp/src/ui/terminal/main.c:1.6 pspp/src/ui/terminal/main.c:1.7
--- pspp/src/ui/terminal/main.c:1.6 Tue Apr 25 00:41:12 2006
+++ pspp/src/ui/terminal/main.c Tue Apr 25 16:41:33 2006
@@ -59,6 +59,7 @@
static void fpu_init (void);
static void handle_error (int code);
static int execute_command (void);
+static void terminate (bool success) NO_RETURN;
/* If a segfault happens, issue a message to that effect and halt */
void bug_handler(int sig);
@@ -66,7 +67,6 @@
/* Handle quit/term/int signals */
void interrupt_handler(int sig);
-void terminate (bool success);
/* Program entry point. */
int
@@ -111,7 +111,6 @@
}
terminate (err_error_count == 0);
- abort ();
}
/* Parse and execute a command, returning its return code. */
@@ -245,25 +244,26 @@
/* Terminate PSPP. SUCCESS should be true to exit successfully,
false to exit as a failure. */
-void
+static void
terminate (bool success)
{
static bool terminating = false;
- if (terminating)
- return;
- terminating = true;
-
- msg_done ();
- outp_done ();
-
- cancel_transformations ();
- dict_destroy (default_dict);
-
- random_done ();
- settings_done ();
- fh_done ();
- lex_done ();
- getl_uninitialize ();
+ if (!terminating)
+ {
+ terminating = true;
+ msg_done ();
+ outp_done ();
+
+ cancel_transformations ();
+ dict_destroy (default_dict);
+
+ random_done ();
+ settings_done ();
+ fh_done ();
+ lex_done ();
+ getl_uninitialize ();
+ readln_uninitialize ();
+ }
exit (success ? EXIT_SUCCESS : EXIT_FAILURE);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src/ui/terminal main.c ChangeLog,
Ben Pfaff <=