Lines Matching refs:argv
52 int getopt(int argc, char* const argv[], const char* optstring) {
60 /* Unspecified, but we need it to avoid overrunning the argv bounds. */
64 /* If, when getopt() is called argv[optind] is a null pointer, getopt()
66 if (argv[optind] == NULL)
69 /* If, when getopt() is called *argv[optind] is not the character '-',
71 if (*argv[optind] != '-')
74 /* If, when getopt() is called argv[optind] points to the string "-",
76 if (strcmp(argv[optind], "-") == 0)
79 /* If, when getopt() is called argv[optind] points to the string "--",
81 if (strcmp(argv[optind], "--") == 0) {
87 optcursor = argv[optind] + 1;
96 found) from argv that matches a character in optstring, if there is
106 optional arg; if there is text in the current argv-element
112 an element of argv, then optarg shall contain the next element
113 of argv, and optind shall be incremented by 2. If the resulting
118 option character in that element of argv, and optind shall be
122 optarg = argv[optind];
158 int getopt_long(int argc, char* const argv[], const char* optstring,
173 if (strlen(argv[optind]) < 3 || strncmp(argv[optind], "--", 2) != 0)
174 return getopt(argc, argv, optstring);
177 current_argument = argv[optind] + 2;
202 optarg = strchr(argv[optind], '=');
207 /* Only scan the next argv for required arguments. Behavior is not
210 optarg = argv[optind];
216 } else if (strchr(argv[optind], '=')) {