home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!ilepore
- From: ilepore@nyx.cs.du.edu (Ian Lepore)
- Subject: Re: Problems with ARGV
- Message-ID: <1992Jul29.221225.24054@mnemosyne.cs.du.edu>
- X-Disclaimer: Nyx is a public access Unix system run by the University
- of Denver for the Denver community. The University has neither
- control over nor responsibility for the opinions of users.
- Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
- Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
- References: <9130026@hpbbrd.bbn.hp.com> <92211.111512RESCHKE@DMSWWU1A.UNI-MUENSTER.DE> <1992Jul29.130755.27902@mks.com>
- Date: Wed, 29 Jul 92 22:12:25 GMT
- Lines: 25
-
- > ARGV doesn't allow passing empty arguments
- > use another env var to pass the position of the empty args
-
- I don't like it. It sounds needlessly complicated to create a whole
- 'nother env var for this.
-
- I have two variations on an idea for coping with this. The first variation
- assumes that we never pass binary values in the ARGV. (IE, isprint() is
- TRUE for all chars appearing in the args in the ARGV area.) In this case,
- I'd recommend using \001 as a placeholder for an empty arg. Using this,
-
- grep "" *.c
-
- would be passed as ARGV=\0grep\0\1\0*.c\0\0. If my assumption is invalid,
- and folks do pass binary data in ARGV, then use an escape system where an
- empty arg is \1\1, but a true binary 1 is \1\2. (You could even extend
- this to allow passing binary zeros, escaped as \1\3 for example.)
-
- Thoughts?
-
-
- --
- - Ian
- (void *) where prohibited by law
-
-