delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/03/12/12:02:01

Date: Tue, 12 Mar 1996 18:00:24 +0100
Message-Id: <199603121700.SAA00862@tyr.diku.dk>
From: Morten Welinder <terra AT diku DOT dk>
To: djgpp-workers AT delorie DOT com
In-reply-to: <3145AAAF.639E@tempe.vlsi.com> (message from Charles Marslett on
Tue, 12 Mar 1996 09:47:43 -0700)
Subject: system()


   [Inner quote from eliz AT is DOT elta DOT co DOT il]
   >>       4) `system' ignores some commands that it considers `null'
   >> commands.  Some of them indeed are (like ``rem''), but others aren't.
   >> For instance, ``cd something'' and ``set'' without an argument should not
   >> be ignored, I think.  Right now the code ignores both of these commands
   >> with or without arguments.  Any particular reason for that?
   >
   >Sounds like a "unix compatibility" to me.


Sorry, I've been seriously offline for a few days -- our name
server decided to call it quits.

Anyway, they reason for this handling is that these commands
are not supposed to do anything.  I am pretty sure that the
code was changed by someone else -- I think I carefully put
code in to check for arguments; take a look at the funny
parenthesis settings:

      && ((CHECK_FOR (s, "cd", 2))
	  || CHECK_FOR (s, "rem", 3)
	  || (CHECK_FOR (s, "set", 3))
	  || CHECK_FOR (s, "exit", 4)
	  || CHECK_FOR (s, "goto", 4)
	  || (CHECK_FOR (s, "path", 4))
	  || (CHECK_FOR (s, "chdir", 5))
	  || CHECK_FOR (s, "shift", 5)
	  || (CHECK_FOR (s, "prompt", 6))))

Someone please check the archives.  The current code is not
right.

  cd/chdir -- nop with argument (unix-style)
  set/path/prompt -- nop with argument
  rem/exit/goto/shift -- nop with or without argument

Note that, if someone has a Real Shell then the above behaviour
can be turned off by a flag.

Morten

- Raw text -


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