[comp.sys.amiga.tech] parseargs

sutela@polaris.utu.fi (Kari Sutela) (11/20/90)

I have seen several references to a parseargs() or parseopts() function
(for example, Peter da Silva's) on this newsgroup. I'm wondering if someone
has really implemented this function (or at least, is working on one) or
is its existence just wishful thinking.

On a related note, I found a problem in Aztec C's cliparse() function which
might make getargs() infeasible (with Aztec C, at least). Aztec C's cliparse()
strips ALL quotes from the command string even if the quoted string was a
single word. Thus, a LIST-like command would never be able to tell the
difference between 'LIST FILES' and 'LIST "FILES"'.

To be exact, all quotes are not stripped---for examples, I tried something
like 'LIST ""FILES""' but the result was even worse. If I recall correctly
""FILES"" would be broken into two tokens: the first would be an empty token
(from the first pair of quotes) and the other would contain 'FILES"'. Clearly,
Aztec's cliparse() is broken and a replacement should be written. I have
tested this on version 5.0b --- before I report this bug or feature to Manx
I'd like to know if it behaves similarly in version 5.0d. BTW, how does
SAS C handle these situations?

-- 
Kari Sutela	sutela@polaris.utu.fi

peter@sugar.hackercorp.com (Peter da Silva) (11/21/90)

In article <1990Nov20.115248.19468@polaris.utu.fi> sutela@polaris.utu.fi (Kari Sutela) writes:
> I have seen several references to a parseargs() or parseopts() function
> (for example, Peter da Silva's) on this newsgroup. I'm wondering if someone
> has really implemented this function (or at least, is working on one) or
> is its existence just wishful thinking.

Parseargs exists. I pubbed it in alt.sources a few months ago, and it'll be
pushed out again when Brad Appleton finishes his VMS stuff. Then I'll re-
integrate the Amiga stuff and do a real post to the comp.sources.amiga
group.

(stuff about Aztec's cliparse being broken)

Another reason to have the shell break the tokens up.

Anyway, I just reposted parseargs to alt.sources.amiga. Have fun.
-- 
Peter da Silva.   `-_-'
<peter@sugar.hackercorp.com>.