wget support for no_proxy env var

walter harms wharms at bfs.de
Thu Jun 21 07:08:58 UTC 2007


hi Dan,
gnu libc supports argz (GNU extension) for mapping lists line a,b,c,d into arrays and back
unfortunately there is no official man page but you can use my from
http://www.freiburg.linux.de/projekte/manpages/man/argz/

when you have problems getting it to work i have some examples around but i must search them.

re,
 wh




dann frazier wrote:
> On Tue, Jun 19, 2007 at 10:30:55AM +0200, Bernhard Fischer wrote:
>> On Mon, Jun 18, 2007 at 03:23:20PM -0600, dann frazier wrote:
>>> hey,
>>> The following patch adds support for the no_proxy envvar to the wget
>>> applet. Most of the code is lifted directly from GNU's wget source
>>> (with a few simplifications). This is my first contribution to
>>> busybox and a rare attempt at C for me - let me know if I should
>>> reduce wrap this code in a config option, etc.
>> Yes, please wrap that in a config option.
> 
> ok
> 
>>> +bool sufmatch (char **list, const char *what);
>>> +bool sufmatch (char **list, const char *what)
>>> +{
>>> +	int i, j, k, lw;
>>> +
>>> +	lw = strlen (what);
>>> +	for (i = 0; list[i]; i++) {
>>> +		for (j = strlen (list[i]), k = lw; j >= 0 && k >= 0; j--, k--) 
>>> +			if (tolower (list[i][j]) != tolower (what[k]))
>>> +				break;
>>> +		/* The domain must be first to reach to beginning.  */
>>> +		if (j == -1)
>>> +			return true;
>>> +	}
>>> +	return false;
>>> +}
>> This sounds alike index_in_substr_array(). Perhaps you can reuse this
>> instead? (See also str_tolower())
> 
> I don't see a good way to use index_in_substr_array() since I only
> care if the last part of the string matches. str_tolower() does come
> in handy though, thanks for the suggestion.
> 
> Here's a new version of the patch with these changes:
> 




More information about the busybox mailing list