Contents of argv[0]

ody davidsen at sungod.crd.ge.com
Sat Aug 19 07:29:28 AEST 1989


In article <5722 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:

| struct filename {
| 	char *machine;
| 	char *volume;
| 	char *project;
| 	char *user;
| 	char *path[MAXPATH];
| 	char *filename;
| 	char *extension;
| 	char *version;
| };

	[ ... ]

| Any elements I'm missing?

Well, at least device... the C:foo in MS-DOS and the DRC0:file in VMS
all specify physical devices (which might be mapped in DOS, yes I know).
No one can come up with a struct containing everything which might be in
a path someday. All that was needed by the original poster was a way to
find out the "filename" as understood by the local filesystem.
	bill davidsen		(davidsen at crdos1.crd.GE.COM)
  {uunet | philabs}!crdgw1!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.lang.c mailing list