delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/14/13:42:37

Date: Mon, 14 Aug 2000 20:44:52 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <5567-Mon14Aug2000204450+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.2.emacs20_6 I) and Blat ver 1.8.5b
Subject: Windows-style long command lines
Reply-To: djgpp-workers AT delorie DOT com

I have a working version of c1args.c, dosexec.c, and system.c which
support Windows-style long command lines via the CMDLINE environment
variable.  It is a somewhat reworked version of code written by Mark
and posted here several months ago.

Functionality-wise, there are no significant changes from what Mark
wrote.  The only one that is worth mentioning is that COMMAND.COM on
Windows is now invoked in the same manner as PE executables, although
COMMAND.COM itself is not a PE executable.  I also removed the calls
to putenv, because calling malloc from a library function causes
trouble in Emacs; instead, the code puts the CMDLINE variable directly
into the transfer buffer where it will be picked up by the child
program.

I use the code heavily in the DJGPP port of Emacs, to launch a Windows
command-line mailer (in fact, this message is going to be sent like
that), and it works well enough for me to be sure that it is
reasonably correct.  The branch that invokes COMMAND.COM is also
tested, but less so; the 4DOS/NDOS invocation is not tested at all.

The other direction--receiving CMDLINE in c1args.c--seemed to work
well in limited testing.

I'm writing this so that people who need this feature, or want to play
with it, could ask me for sources or patches.  I will probably commit
the changes, after I use it some more.

Thanks to Mark for writing the code.

- Raw text -


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