1 --- getsubopt.3.bsdnew 2009-11-13 14:11:48.000000000 -0800
2 +++ getsubopt.3 2009-11-13 14:11:48.000000000 -0800
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.
37 @@ -65,10 +69,10 @@ The
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
52 @@ -93,7 +97,7 @@ will be set to point to the ``value'' po
53 if no ``value'' portion was present.
61 @@ -114,7 +118,7 @@ while ((ch = getopt(argc, argv, "ab:"))
65 - switch(getsubopt(&options, tokens, &value)) {
66 + switch(getsubopt(&options, keylistp, &value)) {
68 /* process ``one'' sub option */