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