Error in example of getopt
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
manpages-fr (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: manpages-fr
Hi, in the french "man 3 getopt" we can read as example :
...
main(int argc, char *argv[])
{
int flags, opt;
int nsecs, tfnd;
nsecs = 0;
tfnd = 0;
flags = 0;
while ((opt = getopt(argc, argv, "nt:")) != -1) {
case ’n’:
case ’t’:
HERE ==> argv[1]);
}
}
...
I think that argv[1] sould be argv[0], does i'm wrong ?
Regards,
Vincent Desmares
Is this symptom still reproducible in 9.04?