Lines Matching defs:getopt

1 /*	$NetBSD: getopt.c,v 1.1.1.1 2016/01/13 03:15:30 christos Exp $	*/
4 NOTE: getopt is now part of the C library, so if you don't know what
26 /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
69 contain conflicting prototypes for getopt. */
93 /* This version of `getopt' appears to the caller like standard Unix `getopt'
97 As `getopt' works, it permutes the elements of ARGV so that,
107 #include "getopt.h"
109 /* For communication from `getopt' to the caller.
110 When `getopt' finds an option that takes an argument,
119 and for communication between successive calls to `getopt'.
121 On entry to `getopt', zero means this is the first call; initialize.
123 When `getopt' returns -1, this is the index of the first of the
132 /* Formerly, initialization of getopt depended on optind==0, which
133 causes problems with re-calling getopt as programs generally don't
154 system's own getopt implementation. */
185 `--' can cause `getopt' to return -1 with `optind' != ARGC. */
272 is valid for the getopt call we must make sure that the ARGV passed
273 to getopt is that one passed to the process. */
472 (aside from the initial '-') are option characters. If `getopt'
476 If `getopt' finds another option character, it returns that character,
477 updating `optind' and `nextchar' so that the next call to `getopt' can
480 If there are no more option characters, `getopt' returns -1.
505 When `getopt' finds a long-named option, it returns 0 if that option's
990 getopt (argc, argv, optstring)
1007 the above definition of `getopt'. */
1021 c = getopt (argc, argv, "abc:d:0123456789");
1059 printf ("?? getopt returned character code 0%o ??\n", c);