1 --- _SB/Libc/stdlib/FreeBSD/getsubopt.3 2004-11-25 11:38:41.000000000 -0800
2 +++ _SB/Libc/stdlib/FreeBSD/getsubopt.3.edit 2006-06-28 16:55:52.000000000 -0700
5 .Vt extern char *suboptarg ;
7 -.Fn getsubopt "char **optionp" "char * const *tokens" "char **valuep"
10 +.Fa "char *const *keylistp"
17 -parses a string containing tokens delimited by one or more tab, space or
19 +parses a string containing tokens that are delimited
20 +by one or more tab, space, or comma
23 -It is intended for use in parsing groups of option arguments provided
24 -as part of a utility command line.
25 +It is intended for use in parsing groups of option arguments
26 +that are provided as part of a utility command line.
30 is a pointer to a pointer to the string.
35 .Dv NULL Ns -terminated
36 array of pointers to strings.
40 returns the zero-based offset of the pointer in the
42 -array referencing a string which matches the first token
43 -in the string, or, \-1 if the string contains no tokens or
46 +array, referencing a string which matches the first token in the string
47 + or \-1 if the string contains no tokens or
49 does not contain a matching string.
51 If the token is of the form ``name=value'', the location referenced by
53 if no ``value'' portion was present.
65 - switch(getsubopt(&options, tokens, &value)) {
66 + switch(getsubopt(&options, keylistp, &value)) {
68 /* process ``one'' sub option */