From: Zhi Yin > I want to add new features to Wget. [...]
Look for something similar, and then follow the pattern. The option table is in src/main.c. For example: { "ignore-length", 0, OPT_BOOLEAN, "ignorelength", -1 }, The associated variable is in the "options" structure defined in src/options.h. For example: int ignore_length; /* Do we heed content-length at all? */ Also in src/main.c is the "-h" help string: N_("\ --ignore-length ignore `Content-Length' header field.\n"), Initialization is in src/init.c: { "ignorelength", &opt.ignore_length, cmd_boolean }, And then somewhere in the code, you do something according to the value of opt.ignore_length. In this case, it's used in src/http.c. Out of curiosity, what is the actual problem here? Is there a Web page somewhere with links to, say, "abc.html" and "ABC.HTML", and they actually point to the same file because the underlying file system is case-insensitive? My Web server ("Apache/1.3.20 (OpenVMS) [...]") runs on a case-insensitive (ODS2) file system, but (I claim) only a dope would rely on this fact when creating the HTML. For one thing, most (all?) Web servers can map practically any URL into any file name, so there's no guarantee that URL's "abc.html" and "ABC.HTML" would actually map to the same file (because, while it would be likely, you're never sure, for example, that URL "abc.html" is mapped into file "abc.html"). And if you ever move the Web server storage to a system with a case-sensitive file system (UNIX-like), things will break. It's just bad design (or bad implementation). I don't get out much, but I've never seen this problem. Who has a Web site which is this lame? If there is one, won't it be confusing browsers, too, so they'd be caching multiple copies of data? I'd put more effort into getting the Web server(s) fixed than I would adding relatively useless features to wget to work around the problem. But it's your life. ------------------------------------------------------------------------ Steven M. Schweda [EMAIL PROTECTED] 382 South Warwick Street (+1) 651-699-9818 Saint Paul MN 55105-2547