Mail Archives: djgpp/2000/06/14/12:59:42
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 -