Mail Archives: djgpp-workers/1999/04/13/05:47:32
On Tue, 13 Apr 1999, Eli Zaretskii wrote:
> On Mon, 12 Apr 1999, Salvador Eduardo Tropea (SET) wrote:
> > > What do you recommend for those poor souls whose path variable is already
> > > filled to overflowing?
> It needs at least to be detected. Here's one way:
>
> set OLDPATH=%PATH%
> set PATH=C:\DJGPP\BIN;%PATH%
> if not "%PATH%"=="C:\DJGPP\BIN;%OLDPATH%" echo ERROR
Unless my knowledge on command.com is completely failing me, here, this
will not work at all. A 'filled close to overflowing' PATH variable is one
that is almost as long as the DOS command line lenght limit (around 127
chars). This would make the 'if' command above be about 240 or more chars
long (two copies of those 120+ chars of %PATH% in it), clearly too long to
even parse correctly, let alone produce a working check.
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -