Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!math.fu-berlin.de!msi.umn.edu!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve Yelvington) Newsgroups: comp.sys.atari.st Subject: Re: TOS Command Line Message-ID: Date: 9 May 91 03:33:42 GMT References: Organization: St. Croix Valley C and Ski Lines: 52 [In article , ersys!mforget@nro.cs.athabascau.ca (Michel Forget) writes ... ] >> All that's necessary is that the parent process and the child process agree >> on whatever extended argument-passing convention is in use. > > Uh-oh. I am trying to pass long command lines to RZ.TTP (The Zmodem File > Transfer Program) for batch Uploading and Downloading. The problem with > the limit becomes obvious when you realize how few pathnames can be put > on an 80 (or even 125) character command line. I wrote a program that > will capture the command line when it is run and display it, and will try > it on other programs that use SZ. I don't think that it supports the > XARG convention you mentioned. Any other ideas? In that case you need to find out what compiler was used to make the RZ/SZ programs. My guess would be Mark Williams, whose argument-passing scheme is explained somewhat in the EXARG.DOC file. But that's just a guess. If it's a correct guess: Mark Williams passes arguments in the environment, so you need to know how the environment is handled under GEMdos. Remember that Pexec takes three arguments: An integer mode flag, a pointer to a Pascal-style command string (first char of the string encodes its length), and a pointer to the environment. The environment is -- and somebody correct me please if I get this wrong -- a sequence of C-style strings (simple arrays, terminated by a null byte) with an extra null byte to terminate the environment itself. Each entry in the environment is of the form TAG=value So, if 0 stands for a null byte, the environment might look like this: PATH=A:\0USER=steve0ICECREAM=Chocolate00 If I read the MWC documentation correctly, it would pass arguments by adding ARGV= to the environment followed by null-terminated arguments. Example: PATH=A:\0USER=steve0ICECREAM=Chocolate0ARGV=sz0file10file20file300 If there's no need for sz to know that the user is steve, the PATH is A:\ and the ice cream is Chocolate, I suppose you can leave that out. :-) There are other things that can be encoded in the Mark Williams ARGV string, but this is the basic idea. ---- Steve Yelvington, Marine on St. Croix, Minnesota, USA / steve@thelake.mn.org