Subject:
|
Re: PRGM button - am I missing something?
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 12 Jan 2000 02:43:33 GMT
|
Viewed:
|
1394 times
|
| |
| |
In lugnet.robotics.rcx.legos, Markus L. Noga writes:
> Ben Jackson schrieb:
> > I think you need `dll -p0 foo.lx' and `dll -p1 bar.lx'.
>
> If getopt is working right, the position of switches shouldn't matter.
> If they do, it's broken.
From getopt(3) on BSD and other systems:
When all options have been processed (i.e., up to the first
non-option argument), getopt() returns -1.
However, from the Linux manpage:
By default, getopt() permutes the contents of argv as it
scans, so that eventually all the non-options are at the
end. Two other modes are also implemented. If the first
character of optstring is `+' or the environment variable
POSIXLY_CORRECT is set, then option processing stops as
soon as a non-option argument is encountered.
No surprise, Linux is nonstandard (or should I say: broken in a way that
someone thought was clever). Actually, to make dll and makelx build on other
platforms getopt_long has to be turned into getopt.
--Ben
|
|
Message has 1 Reply:
Message is in Reply To:
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|