Mail Archives: djgpp/1998/01/29/14:15:33
Zippy wrote:
<snip>
> #include <stdio.h>
>
> main(int argc, char *argv[])
> {
> char *d, *p, *n, *e;
> int dummy = fnsplit(argv[1], d, p, n, e);
> /* This splits a filename into drive, path, name and extension. */
>
> dummy = rename("oldname.txt", strcat(n, ".txt"));
> }
i would suggest you type "info libc alpha fnsplit" on the command line
and read the documentation carefully. if d, p, n and e are not NULL,
they have to point to something. in this case, they are not initialized.
you will get different results based on what crazy values they end up
taking.
<snip>
> I managed to
> trace the problem down to the environment variable not being set,
in light of the above, this sounds like a red herring.
--
----------------------------------------------------------------------
A. Sinan Unur
Department of Policy Analysis and Management, College of Human Ecology,
Cornell University, Ithaca, NY 14853, USA
mailto:sinan DOT unur AT cornell DOT edu
http://www.people.cornell.edu/pages/asu1/
- Raw text -