command line options
Miles Bader
bader+ at andrew.cmu.edu
Wed Apr 6 23:50:34 AEST 1988
g-rh at cca.CCA.COM (Richard Harter) writes:
> o It is desirable that the argument processor be able to handle
> untokenized argument strings. The reason for bringing this up
> is that our current processor can do this. In applications with
> an interpretive command processor, the parser for the interpreter
> may not necessarily follow unix parsing command line parsing rules.
Write a separate string tokenizer.
> o When getopt processes an option with a value it returns a pointer
> to a location within a string that it is passed. The assumption
> is made that this string is null terminated at the right place.
> No copy of the string is made. My opinion is that the argument
> processor should generate a copy of the string or value. This
> is relevant in the case of an interpretive command processor --
> the original token string may vanish.
Again, you can do this outside the arg processor, in those cases
where you need to keep the actual string. In many cases you don't.
-Miles
More information about the Comp.lang.c
mailing list