www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/04/01/08:58:37

Date: Mon, 1 Apr 1996 15:55:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp-workers AT delorie DOT com
Subject: Style of slashes and `system'
Message-Id: <Pine.SUN.3.91.960401154042.13012A-100000@is>
Mime-Version: 1.0

One annoying problem with invoking DOS commands from Unix-originated
programs is the style of slashes.  COMMAND.COM and most (all?) of DOS
external commands can't grok forward slashes, so if you need to invoke
such command from, say, Make or Find, you're in trouble.  (I know that
using GNU Fileutils solves the problem, but not everybody has them.)

There are several possible solutions to this:

	1) Make `system' know about DOS commands and convert the slashes.
This will bloat the code of `system'.

	2) Make the application know about DOS commands and do the 
conversion.  That is what Make does, but it requires each application to 
reinvent the wheel.

	3) Include a special library function that every application 
could link in to get the conversion.

	4) Write a program that will convert the slashes and call
COMMAND.COM to do the actual job.  (We can even create a few symlinks to
this program for several popular DOS commands so that you don't need to
name this converting program explicitly.)

Any opinions on what's the best solution?  Personally, I prefer the last 
one, but I didn't think about this too much.

- Raw text -


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