bugGNU Wget - Bugs: bug #20388, Don't use global var to determine...

 
 

bug #20388: Don't use global var to determine tilde-expansion

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Fri 06 Jul 2007 11:17:50 PM UTC  
 
Category: Feature RequestSeverity: 1 - Wish
Priority: 1 - LaterStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: 1.12
Planned Release: 1.14Regression: None
Work Required: 0 - HoursPatch Included: Yes

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 14 Jun 2009 12:36:26 AM UTC, comment #4:

Fixed in 60a504123112.

Micah Cowan <micahcowan>
Sat 13 Jun 2009 08:49:57 PM UTC, comment #3:

stsc also has a modified version of jpichon's patch, which modifies the command signature to take an int, instead of wrapping the int-taking tilde-flag thing to fit the command signature.

http://stsc.refcnt.org/src/wget/init.c.patch

Micah Cowan <micahcowan>
Sat 13 Jun 2009 05:53:52 PM UTC, comment #2:

Patch suggestion at: http://article.gmane.org/gmane.comp.web.wget.general/8607/

Micah Cowan <micahcowan>
Thu 26 Feb 2009 03:20:43 PM UTC, comment #1:

I think we can't get easily ride of this global variable. Here is
a simplified view of the code lay-out:

static int bool enable_tilde_expansion = false;

run_wgetrc
{
enable_tilde_expansion = true;

while()
{
cmd_file(com, val, place);
}

enable_tilde_expansion = false;
}

static bool cmd_file(char com, char val, void *place)
{
if(enable_tilde_expansion)
do_something();
}

The first idea we can have is to add a new parameter to the
function cmd_file, but this function is pointed to by a pointer
of type: bool (ptr)(char, char , void ), and is used
several times to call the cmd_file (line 900, line 905, line 910)
in the file main.c.

So we can't add a new parameter to this function, and must
change the behavior thanks to a global variable.

Pichon Julien <jpichon>
Fri 06 Jul 2007 11:17:50 PM UTC, original submission:

tilde-expansion very likely doesn't need its own global variable, just to enable it for one spot!!

Micah Cowan <micahcowan>

 

(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 jpichon (Posted a comment)
  • -unavailable- added by micahcowan (Submitted the item)
  •  

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

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 14 Jun 2009 12:36:26 AM UTCmicahcowanStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.12
    Sat 13 Jun 2009 08:49:57 PM UTCmicahcowanPatch IncludedNone=>Yes
    Sat 13 Jun 2009 08:49:56 PM UTCmicahcowanPlanned Release1.15=>1.14
    Sun 27 Jan 2008 04:38:41 AM UTCmicahcowanPlanned Release1.12=>1.15
    Tue 31 Jul 2007 11:59:08 PM UTCmicahcowanPriority5 - Normal=>1 - Later
    Fri 20 Jul 2007 05:11:04 AM UTCmicahcowanPlanned ReleaseNone=>1.12

    Back to the top


    Powered by Savane 3.1-cleanup1