Mail Archives: djgpp/1993/12/07/10:15:58
On Tue, 7 Dec 1993 softbrek AT POOL DOT Informatik DOT RWTH-Aachen DOT DE wrote:
> >
> > This is a problem with a number of GNU ports, eg, GZIP and Eric
> > Backus's ports. You find that there are a number of files with
> > different names and identical content.
> >
> > The solution in the X world is the `-name <any-name>' argument.
> > (Example: This allows xclock to look for resources under XClock, the
> > generic name, and also under a name like seattle. So when I run
> > "xclock", the time offset is automatically set to +9 for Japan, but
> > when I run "xclock -name seattle", I can find out what time it is at
> > my friend's home with the offset set to -8.) I would guess that
> > adding this functionality to GO32 would break something (probably
> > X-windows ports!), it always does (cf. the O_BINARY thread).
> >
>
> Two alternatives I have tried
> 1) Wait for 1.11! It will have a symbolic link-feature built in.
> 2) There is a little trick do-able with a batch-script: make up a batch-file
> for any special name of the file, e.g. create a file 'gunzip.bat' like:
>
Why not write a small C program:
/* DODAT.C */
#include <stdlib.h>
void main(int argc, char *argv[])
{
execv("DOIT.EXE", argv[]); /* or another flavor of exec() */
}
DOIT.EXE will see that argv[0] = "DODAT.EXE", won't it? This seems to
be a pretty simple way to solve the problem. Not as small as a symbolic
link though. The PBMplus utilities really just want argv[0] to be set so
the main program can tell what to do. Also, in the case of PBMplus, you
can compile this once, and copy it 100-some-odd times to make all the
programs.
Hope this helps :)
Ed
/***************************************************************************/
/* Ed Phillips flaregun AT brahms DOT udel DOT edu University of Delaware */
/* Jr Systems Programmer (302) 831-6082 NSS/Software Systems */
/*************************************************************************> @c:\wherever\it\is\gzip.exe -d %1 %2 %3 %4 %5 %6 %7 %8 %9
- Raw text -