bugPSPP - Bugs: bug #19126, Cleanups in src/ui/terminal/main.c

 
 

bug #19126: Cleanups in src/ui/terminal/main.c

Submitted by:  Ben Pfaff <blp>
Submitted on:  Fri 23 Feb 2007 05:44:20 AM UTC  
 
Category: OtherSeverity: 1 - Wishlist
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: Post-0.6.0
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 15 Apr 2011 04:55:21 AM UTC, comment #1:

The first three of the four bullet points have been fixed without any of us remembering this bug.

The fourth is arguably not a big deal, and I think we've improved in this area anyhow.

Ben Pfaff <blp>
Project Administrator
Fri 23 Feb 2007 05:44:20 AM UTC, original submission:

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

  • 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 parses.
  • If terminate() is necessary, then for consistency there should also be initiate().
  • This code:

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

  • 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.
Ben Pfaff <blp>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by blp (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Apr 2011 04:55:21 AM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 25 Jul 2007 03:21:10 PM UTCblpReleaseNone=>Post-0.6.0

    Back to the top


    Powered by Savane 3.1-cleanup1