delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/14/12:59:42

Date: Wed, 14 Jun 2000 16:50:37 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: PBM Utilities
In-Reply-To: <Pine.LNX.4.10.10006141536150.6658-100000@acp3bf>
Message-ID: <Pine.SUN.3.91.1000614164334.995A-100000@is>
MIME-Version: 1.0
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id JAA22944
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 14 Jun 2000, Hans-Bernhard Broeker wrote:

> Yes, it is, but it's awful, and existing scripts would almost certainlyñ 
> not expect this to be necessary. They'll assume that if the PBM utilities
> are present, a command line like
> 
> 	ppmquant < foo.ppm | ppmtogif > foo.gif
> 
> will work.

Scripts are not the problem: they invoke batch files via COMMAND.COM 
anyway, so redirection works, at least as long as we are talking about 
the DJGPP port of Bash which calls `system' to run the batch files.

Command-line invocation is what I had in mind when I wrote my previous 
message.  Granted, it's ugly (and also exhausts the DOS 126-character 
limit much quicker).

> There's also the additional complication that most PBM
> utilities need their stdout and stdin in binary mode. I'm not sure 
> the command/c method preserves this across the '|', off hand.

I'm afraid I don't follow.  First, the binary mode is something that only 
exists at the application level; DOS itself doesn't know anything about 
it (it's the library which implements the distinction).  So you certainly 
_cannot_ preserve the binary mode across applications, pipes, etc.

But I also don't see why is this a problem: an application that needs its 
stdin/stdout in binary mode presumably makes that switch explicitly in 
the application code: how else can it be sure that standard streams are 
in binary mode?  If that's what happens, I don't see why do you need to
worry about peserving the binary mode across applications.

- Raw text -


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