delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/09/03/01:42:07

Date: Sun, 3 Sep 2000 08:39:44 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Re: Doc for __dosexec_find_on_path()
In-Reply-To: <39B1535D.75A11A6E@phekda.freeserve.co.uk>
Message-ID: <Pine.SUN.3.91.1000903081819.24880H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 2 Sep 2000, Richard Dawe wrote:

> I also broke the the spawn*() declarations across two lines,
> rather than relying on automatic breaks.

There's no automatic line breaks inside @example.  So breaking long lines 
by hand is a Good Thing.

In fact, most of the library's .txh files need to be fixed like that: 
many Description sections overflow the page margins when a printable 
version of the reference is produced.  I think that every @example in the 
Description section should be replaced with @smallexample (with a 
suitable change to "@end example"), and then the lines which are longer 
than 60 characters should be broken into multiple lines.

So I'd like to ask everybody who changes or adds documentation to please 
take care of this issue as well.

Alternatively, we could change mkdoc.cc to do that automatically for us; 
but I'm not sure how ugly will the automatic line breaks look.

> Don't we need an interpreter line for '.cmd' using
> __dosexec_command_exec()? I've probably misunderstood the point of this
> table.

The ".cmd" extension needs to be in the table only if we want to be able 
to do something special with *.cmd files when they are specified without 
the extension, or if we want to be able to run *.cmd files via `spawn*'.

The way things are now, if you say ``system("foo");'' and there's
foo.cmd somewhere on the PATH, it will not be found, and the library
will eventually give up and invoke the shell to DTRT.  This will
indeed work unless one of these happens to be true: 

  - the shell doesn't know how to run *.cmd files, or cannot find them if 
    they don't have an explicit .cmd extension;
  - the shell's notion of PATH does not include some of the directories 
    DJGPP knows about (e.g., if the shell somehow doesn't use PATH to 
    look for its scripts).

> Also, if you cannot invoke .cmd files without using the extension,
> I guess it will be handled by script_exec() anyway.

No, script_exec only handles Unix-style scripts.  *.cmd files will be 
passed by `system' to _dos_exec.  If you try to invoke *.cmd files via 
spawn*, it will fail.

- Raw text -


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