delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/12/07/05:10:44

From: softbrek AT POOL DOT Informatik DOT RWTH-Aachen DOT DE
Subject: Re: Symbolic links and functionality [ was: O_BINARY ]
To: turnbull AT shako DOT sk DOT tsukuba DOT ac DOT jp (Stephen Turnbull)
Date: Tue, 7 Dec 1993 10:44:35 +0100 (MET)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)

> 
> 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).
> 
> However, maybe we could make a standard DJGPP port convention that
> these programs would accept the `-name' argument.  If you have 4DOS
> (does DOS 6 have aliases now?) you can do the following:
> 
> alias gzip `gnuzip -name gzip %1`
> alias gunzip `gnuzip -name gunzip %1`
> 
> (you may need to fiddle with the syntax to prevent recursive
> evaluation of the aliases, I forget exactly).  This would give almost
> the same functionality as symbolic links.

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:

	@c:\wherever\it\is\gzip.exe -d %1 %2 %3 %4 %5 %6 %7 %8 %9
   
   and put it in your path (preferrably where gunzip.exe would be). This
   Batch-file does exactly the same as gunzip is expected to do, except
   for the name not being displayed as 'gunzip' in the help-message gettable
   by --help or -? in the most programs. For the pbm-utils, which accept
   the name they would normally linked to on the command-line as their first
   argument, you can do the same with some dozens of Batch-files like

    	@c:\some\where\ppmmerge.exe ppmquant.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
	                                    ^^^^ This might be false, so see
	                                         the documentation for it!

   Now you might say 'But what about pipeing???' (Absolutely necessary for
   pbm). This is impossible with batch-files like this. *BUT*, you can make
   it become possible, if you *compile* the batch-files with PC-Magazine`s
   'bat2exec'. Then they become '*.com'-files, and they allow pipeing.
   (I`m not sure, but maybe you have to add 'call' or 'command /c' to
   the batch-files to make this work. I have done it at home, so the files
   are not at hand).

Maybe this can save a bit of fiddling around for someone.
  
Hans-Bernhard Broeker (softbrek AT POOL DOT Informatik DOT RWTH-Aachen DOT DE)
---
Even if all the snow is burnt, we still remain the ashes.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019