Lines Matching refs:optstring

48     private String optstring;
74 optstring = optionString;
91 if (optstring == null) {
121 if (opterr && optstring.charAt(0) != ':') {
132 * (optstring) as a regular, single character option. If the option
133 * is found, return an index into optstring where the short-option
138 parseshort(String optstring, char c)
145 int len = optstring.length();
147 ch = optstring.charAt(i);
153 for (++i; i < len && (ch = optstring.charAt(i)) != ')'; ++i);
162 * (optstring) as a long-option contained within parenthesis. If the
165 * If the option is found, return an index into optstring at the
169 * @param optstring the entire optstring passed to the {@code
181 * @return index to equivalent short-option in optstring, or -1 if
182 * option not found in optstring.
185 parselong(String optstring, String opt, StringRef longoptarg)
187 int cp; // index into optstring, beginning of one option spec
188 int ip; // index into optstring, traverses every char
189 char ic; // optstring char
190 int il; // optstring length
194 boolean match; // true if opt is matching part of optstring
198 il = optstring.length();
201 ic = optstring.charAt(ip);
204 ic = optstring.charAt(ip);
207 ic = optstring.charAt(ip);
213 while (ip < il && (ic = optstring.charAt(ip)) != ')' &&
232 ic = optstring.charAt(ip);
236 * Handle double-colon in optstring ("a::(longa)") The old
239 while ((cp > 0) && (cp < il) && (optstring.charAt(cp) == ':')) {
354 * Note that the syntax of optstring applies special meanings to
363 * the option in optstring by the appropriate algorithm. Either
365 * optstring if the option is found and -1 otherwise.
375 ? ((cp = parselong(optstring, args[optind].substring(2),
377 : ((cp = parseshort(optstring, c)) != -1))) {
390 optopt = c = optstring.charAt(cp);
415 if (cp + 1 < optstring.length() && optstring.charAt(cp + 1) == ':') {
431 return (optstring.charAt(0) == ':' ? ':' : '?');