Lines Matching refs:str
49 static int parse_num __P((char *str, const char *key, int *valp));
191 parse_num(str, key, valp) in parse_num() argument
192 char *str; in parse_num()
199 p = strstr(str, key);
278 static char str[MAX_ENDP_LEN*3+8]; local
289 (void) slprintf(str, sizeof(str), "IP:%I", htonl(addr));
290 return str;
299 q = str;
301 q += slprintf(q, sizeof(str)-1, "%s",
304 q += slprintf(q, sizeof(str)-1, "%d", ep->class);
311 q += slprintf(q, str + sizeof(str) - q, "%.2x", ep->value[i]);
313 return str;
326 str_to_epdisc(ep, str) in str_to_epdisc() argument
328 char *str;
335 if (strncasecmp(str, endp_class_names[i], sl) == 0) {
336 str += sl;
342 i = strtol(str, &endp, 10);
343 if (endp == str) {
345 str);
348 str = endp;
351 if (*str == 0) {
355 if (*str != ':' && *str != '.') {
356 option_error("invalid class/value separator '%c'", *str);
359 ++str;
363 i = parse_dotted_ip(str, &addr);
364 if (i == 0 || str[i] != 0)
371 get_if_hwaddr(ep->value, sizeof(ep->value), str) >= 0) {
377 p = str;
379 if (*str == 0)
381 if (p <= str)
382 for (p = str; isxdigit(*p); ++p)
384 i = p - str;
386 option_error("no valid hex digits in \"%s\"", str);
389 ep->value[l] = hexc_val(*str++);
391 ep->value[l] = (ep->value[l] << 4) + hexc_val(*str++);
392 if (*str == ':' || *str == '.')
393 ++str;
395 if (*str != 0) {