[Freedos-user] [Fwd: CMDXSWP.COM missing from list of DOS shells]

2004-04-03 Thread Florian Xaver
From the djgpp mailing list:

 Original Message 
Subject: CMDXSWP.COM missing from list of DOS shells
Date: Fri, 02 Apr 2004 22:11:25 GMT
From: Fabrizio Gennari [EMAIL PROTECTED]
Organization: TIN
Newsgroups: comp.os.msdos.djgpp
FreeDOS distributes a shell called CMDXSWP.COM, which is a DOS-style
shell. i.e. requires the /c switch when launching commands.
Unfortunately, it is not present in the list of DOS-style shells present
 in the file libc/dos/process/dosexec.c, variable shell_brokets. Since
FreeDOS by default sets the COMSPEC env variable to point to this, it
may cause problems: for example, the system() function invokes the shell
without /c, causing the invocation to fail.
Example: take this somple program

int main(){
system(echo Hello World!);
return 0;
}
, compile it with DJGPP, and run it on a FreeDOS system with FreeDOS
installed, no SHELL variable and the variable COMSPEC pointing to
CMDXSWP.COM . It fails, because system(), detecting that echo is not an
executable file, tries to launch the shell, passing echo Hello World!
as the parameter. Unfortunately, it does that without the /c switch.
The fix would be to include CMDXSWP.COM in dosexec.c. A workaround is to
 set the SHELL variable to COMMAND.COM, which is correctly detected by
DJGPP as being a DOS-style shell.
---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Freedos-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] [Fwd: CMDXSWP.COM missing from list of DOS shells]

2004-04-03 Thread Bernd Blaauw
  Hi,

  CMDXSWP is just a renamed FreeCOM (command.com) placed in the FreeDOS
directory for distinguishing the non-XMS FreeCOM version (command.com) from
the XMS-swap version (cmdxswp.com).

  in the next FreeDOS release (estimated release: within 2 weeks) this has
been changed:

  C:\FDOS\BIN\ contains command.com (non-XMSswap version).
  C:\FDOS\NLS contains command.cln and xmsswap.cln and strings.dat

  and then either C:\COMMAND.COM or C:\FDOS\COMMAND.COM are a command.com.
  80286+: COPY /B XMSSWAP.CLN + STRINGS.DAT C:\COMMAND.COM
  8086/80186: COPY /B COMMAND.CLN + STRINGS.DAT C:\COMMAND.COM

  so you'll just need a more generic solution for DJGPP.
  DOS-style shell versus Unix-style shell doesn't say anything to me.

  best solution for DJGPP might be to just stick with COMMAND.COM as name.

  Bernd

   FreeDOS distributes a shell called CMDXSWP.COM, which is a DOS-style
   shell. i.e. requires the /c switch when launching commands.
   Unfortunately, it is not present in the list of DOS-style shells present
 in the file libc/dos/process/dosexec.c, variable shell_brokets. Since
   FreeDOS by default sets the COMSPEC env variable to point to this, it
   may cause problems: for example, the system() function invokes the shell
   without /c, causing the invocation to fail.





---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Freedos-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-user