2008-02-12 Peter Rosin <peda@lysator.liu.se>
* libc/stdlib/getopt.c (getopt_internal): Handle optional
        arguments better for long options and short options not
        appearing as the first option in a sequence.
			
			
This commit is contained in:
		| @@ -1,3 +1,9 @@ | |||||||
|  | 2008-02-12  Peter Rosin  <peda@lysator.liu.se> | ||||||
|  |  | ||||||
|  | 	* libc/stdlib/getopt.c (getopt_internal): Handle optional | ||||||
|  | 	arguments better for long options and short options not | ||||||
|  | 	appearing as the first option in a sequence. | ||||||
|  |  | ||||||
| 2008-02-11  Patrick Mansfield  <patmans@us.ibm.com> | 2008-02-11  Patrick Mansfield  <patmans@us.ibm.com> | ||||||
|  |  | ||||||
| 	* libc/machine/spu/straddr.h: New file, supplies _straddr. | 	* libc/machine/spu/straddr.h: New file, supplies _straddr. | ||||||
|   | |||||||
| @@ -308,13 +308,8 @@ getopt_internal (int argc, char *const argv[], const char *shortopts, | |||||||
|     case OPTIONAL_ARG: |     case OPTIONAL_ARG: | ||||||
|       if (*possible_arg == '=') |       if (*possible_arg == '=') | ||||||
|         possible_arg++; |         possible_arg++; | ||||||
|       if (*possible_arg != '\0') |       optarg = (*possible_arg != '\0') ? possible_arg : NULL; | ||||||
|         { |  | ||||||
|           optarg = possible_arg; |  | ||||||
|       optwhere = 1; |       optwhere = 1; | ||||||
|         } |  | ||||||
|       else |  | ||||||
|         optarg = NULL; |  | ||||||
|       break; |       break; | ||||||
|     case REQUIRED_ARG: |     case REQUIRED_ARG: | ||||||
|       if (*possible_arg == '=') |       if (*possible_arg == '=') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user