Hi,
* Gisle Vanem ([EMAIL PROTECTED]) wrote:
> 'program_name' is used in lib/error.c, but it is not allocated anywhere.
> Should it be added to main.c and initialised to exec_name?
$cd wget-mainline
$find . -name '*.[ch]' -exec fgrep -H -n 'program_name' '{}' \;
./lib/error.c:63:# define program_name program_invocation_name
^^^^^^^^^^^^^^^^^^^^^^^
./lib/error.c:95:/* The calling program should define program_name and set it
to the
./lib/error.c:97:extern char *program_name;
./lib/error.c:248: __fxprintf (NULL, "%s: ", program_name);
./lib/error.c:250: fprintf (stderr, "%s: ", program_name);
./lib/error.c:307: __fxprintf (NULL, "%s:", program_name);
./lib/error.c:309: fprintf (stderr, "%s:", program_name);
./src/netrc.c:463: char *program_name, *file, *target;
./src/netrc.c:472: program_name = argv[0];
Google for that and you will find the corresponding man page. Like it's
written here
http://www.tin.org/bin/man.cgi?section=3&topic=PROGRAM_INVOCATION_NAME
"These variables are automatically initialised by the glibc run-time
startup code."
I've also opened Wget with GDB: the variable exists but seems to point to
a bad memory area...
Sincerly,
Saint Xavier.