Date: Wed, 14 Jun 2000 16:50:37 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Hans-Bernhard Broeker cc: djgpp AT delorie DOT com Subject: Re: PBM Utilities In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Transfer-Encoding: 8bit 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 Precedence: bulk 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.