Article View: comp.std.c
Article #4798Re: how pass argv to exec cde ?
From: James Kanze US/ESC 60/3/141 #407...
Date: Mon, 19 Feb 1996 16:28
Date: Mon, 19 Feb 1996 16:28
36 lines
1767 bytes
1767 bytes
In article <4fs44l$3p8@moody.mchh.siemens.de> Ronald Fischer
<ronald.fischer@uebemc.siemens.de> writes:
|> capi@hds.univ-compiegne.fr () wrote:
|> >hello everybody
|> >i hope that i am in the right group !
You're not. This should have been in comp.os.msdos.programmer.
|> >i want do start the edit.com program via a C file
|> >the cde is c:\dos\edit.com
|> >and the argument is the name of a file, for exemple zoo.asm
|> >
|> >i've try the exec..(path, argv) cde with
|> >path="c:\\dos\\edit.com" and
|> >argv[0]="zoo.asm"
|> >argv[1]=null
|> >
|> >but when edit start i've got an error : incorrect file name (for edit)
|> >where is the error ?
|> >who could help me ?
|> >many thanks for your reply
|> >
|> The correct code is either
|> {
|> char const path[]="c:\\dos\\edit.com";
|> execl(path,path,"zoo.asm",0);
^
Wrong. This is one of the rare cases where you have to cast the 0 (or
NULL) to the correct type.
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils, études et réalisations en logiciel orienté objet --
-- A la recherche d'une activité dans une region francophone
Technical Details
Message-ID:
<KANZE.96Feb19172802@slsvewt.lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!blackbush.xlink.net!slsv6bt!newsReferences:
<4fbd0o$aj5@sunsic.si.univ-compiegne.fr> <4fs44l$3p8@moody.mchh.siemens.de>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c Path: arc1-ca.pugleaf.net!blackbush.xlink.net!slsv6bt!news From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Subject: Re: how pass argv to exec cde ? In-Reply-To: Ronald Fischer's message of 14 Feb 1996 07:48:37 GMT Message-ID: <KANZE.96Feb19172802@slsvewt.lts.sel.alcatel.de> Sender: news@lts.sel.alcatel.de Organization: SEL References: <4fbd0o$aj5@sunsic.si.univ-compiegne.fr> <4fs44l$3p8@moody.mchh.siemens.de> Date: 19 Feb 1996 16:28:01 GMT