Home | History | Annotate | Download | only in radioctl

Lines Matching defs:topt

301 str_to_opt(const char *topt)
305 if (topt == NULL || *topt == '\0')
309 toptlen = strlen(topt);
314 if (strncmp(topt, varname[res], len) == 0)
318 warnx("name not found `%s'", topt);
364 char *topt = NULL;
391 if ((topt = (char *)malloc(optlen)) == NULL) {
395 strlcpy(topt, s, optlen);
397 if ((o->option = str_to_opt(topt)) == (int)OPTION_NONE) {
398 free(topt);
401 o->string = topt;
403 topt = &s[optlen];
404 switch (*topt) {
407 o->sign = (*topt == '+') ? SIGN_PLUS : SIGN_MINUS;
408 o->value = str_to_long(&topt[1], o->option);
411 if (strncmp(topt, offchar,
414 else if (strncmp(topt, onchar,
419 if (strncmp(topt, "up", slen > 2 ? slen : 2) == 0)
423 if (strncmp(topt, "down", slen > 4 ? slen : 4) == 0)
427 if (*topt > 47 && *topt < 58)
428 o->value = str_to_long(topt, o->option);
433 warnx(badvalue, topt);