[Top][All Lists]

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

PSPP-BUG: [bug #19126] Cleanups in src/ui/terminal/main.c

From: Ben Pfaff
Subject: PSPP-BUG: [bug #19126] Cleanups in src/ui/terminal/main.c
Date: Fri, 23 Feb 2007 05:44:21 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20061205 Iceweasel/ (Debian-


                 Summary: Cleanups in src/ui/terminal/main.c
                 Project: PSPP
            Submitted by: blp
            Submitted on: Thursday 02/22/07 at 21:44
                Category: Other
                Severity: 1 - Wishlist
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None



These were proposed by John Darrington back in November 2006 and still make

* parse_command_line should be closer to the start of main.  It's where it is
now, because it actually does more than parsing.  It also performs actions on
the data it parses.  Some of these actions depend upon things being
initialised, whereas others cannot be initialised until the data has been
parsed.  Hence we have some of the _init functions called before
parse_command_line, and some in the body of the if {}.  I suggest that
parse_command_line is changed to do just parsing, and return the data it

* If terminate() is necessary, then for consistency there should also be

* This code:

static bool terminating = false;
if (!terminating) 
terminating = true;

is racy.  Get rid of it, and use sigvec instead of signal, to prevent

* Where static data is necessary, let's identify those which are effectively
const --- ie are set at startup, and remain with these values until the
program terminates.  Eg: config_path, allow_internal_sort, program_name etc. 
There are ways of enforcing this, but they're a bit cumbersome.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]