Lines Matching defs:getopt

1 /*	$NetBSD: getopt.c,v 1.2 2016/01/10 22:16:40 christos Exp $	*/
25 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
68 contain conflicting prototypes for getopt. */
91 /* This version of `getopt' appears to the caller like standard Unix `getopt'
95 As `getopt' works, it permutes the elements of ARGV so that,
105 #include "getopt.h"
107 /* For communication from `getopt' to the caller.
108 When `getopt' finds an option that takes an argument,
117 and for communication between successive calls to `getopt'.
119 On entry to `getopt', zero means this is the first call; initialize.
121 When `getopt' returns -1, this is the index of the first of the
130 /* Formerly, initialization of getopt depended on optind==0, which
131 causes problems with re-calling getopt as programs generally don't
152 system's own getopt implementation. */
183 `--' can cause `getopt' to return -1 with `optind' != ARGC. */
268 is valid for the getopt call we must make sure that the ARGV passed
269 to getopt is that one passed to the process. */
464 (aside from the initial '-') are option characters. If `getopt'
468 If `getopt' finds another option character, it returns that character,
469 updating `optind' and `nextchar' so that the next call to `getopt' can
472 If there are no more option characters, `getopt' returns -1.
497 When `getopt' finds a long-named option, it returns 0 if that option's
972 getopt (argc, argv, optstring)
989 the above definition of `getopt'. */
1003 c = getopt (argc, argv, "abc:d:0123456789");
1041 printf ("?? getopt returned character code 0%o ??\n", c);