Changes in uspace/lib/c/generic/getopt.c [193d280c:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/getopt.c
r193d280c r9d58539 95 95 * Compute the greatest common divisor of a and b. 96 96 */ 97 static int gcd(int a, int b) 97 static int 98 gcd(a, b) 99 int a; 100 int b; 98 101 { 99 102 int c; 100 103 101 104 c = a % b; 102 105 while (c != 0) { … … 105 108 c = a % b; 106 109 } 107 110 108 111 return b; 109 112 } … … 114 117 * in each block). 115 118 */ 116 static void permute_args(int panonopt_start, int panonopt_end, int opt_end, 117 char **nargv) 119 static void 120 permute_args(panonopt_start, panonopt_end, opt_end, nargv) 121 int panonopt_start; 122 int panonopt_end; 123 int opt_end; 124 char **nargv; 118 125 { 119 126 int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; … … 150 157 * Returns -2 if -- is found (can be long option or end of options marker). 151 158 */ 152 static int getopt_internal(int nargc, char **nargv, const char *options) 159 static int 160 getopt_internal(nargc, nargv, options) 161 int nargc; 162 char **nargv; 163 const char *options; 153 164 { 154 165 const char *oli; /* option letter list index */ … … 288 299 * Parse argc/argv argument vector. 289 300 */ 290 int getopt(int nargc, char * const *nargv, const char *options) 301 int 302 getopt(nargc, nargv, options) 303 int nargc; 304 char * const *nargv; 305 const char *options; 291 306 { 292 307 int retval; … … 317 332 * Parse argc/argv argument vector. 318 333 */ 319 int getopt_long(int nargc, char * const *nargv, const char *options, 320 const struct option *long_options, int *idx) 334 int 335 getopt_long(nargc, nargv, options, long_options, idx) 336 int nargc; 337 char * const *nargv; 338 const char *options; 339 const struct option *long_options; 340 int *idx; 321 341 { 322 342 int retval;
Note:
See TracChangeset
for help on using the changeset viewer.