Lines Matching refs:argv
219 static int opt_help(int argc, char *argv[], int *help)
223 while ((opt=getopt_long(argc, argv, "+h", help_options, NULL)) != EOF) {
236 opt_help(argc, argv, (help)); \
237 argc -= optind; argv += optind; optind = 0; \
240 static int cmd_builddef(int transport, int argc, char *argv[])
274 static int cmd_keylen(int transport, int argc, char *argv[])
282 handle = atoi(argv[0]);
302 static int cmd_clock(int transport, int argc, char *argv[])
325 static int cmd_rand(int transport, int argc, char *argv[])
348 static int cmd_chiprev(int transport, int argc, char *argv[])
408 static int cmd_buildname(int transport, int argc, char *argv[])
433 static int cmd_panicarg(int transport, int argc, char *argv[])
457 static int cmd_faultarg(int transport, int argc, char *argv[])
481 static int cmd_coldreset(int transport, int argc, char *argv[])
486 static int cmd_warmreset(int transport, int argc, char *argv[])
491 static int cmd_disabletx(int transport, int argc, char *argv[])
496 static int cmd_enabletx(int transport, int argc, char *argv[])
501 static int cmd_singlechan(int transport, int argc, char *argv[])
508 channel = atoi(argv[0]);
525 static int cmd_hoppingon(int transport, int argc, char *argv[])
530 static int cmd_rttxdata1(int transport, int argc, char *argv[])
537 freq = atoi(argv[0]);
539 if (!strncasecmp(argv[1], "0x", 2))
540 level = strtol(argv[1], NULL, 16);
542 level = atoi(argv[1]);
555 static int cmd_radiotest(int transport, int argc, char *argv[])
562 freq = atoi(argv[0]);
564 if (!strncasecmp(argv[1], "0x", 2))
565 level = strtol(argv[1], NULL, 16);
567 level = atoi(argv[1]);
569 test = atoi(argv[2]);
582 static int cmd_memtypes(int transport, int argc, char *argv[])
615 static int opt_pskey(int argc, char *argv[], uint16_t *stores, int *reset, int *help)
619 while ((opt=getopt_long(argc, argv, "+s:rh", pskey_options, NULL)) != EOF) {
664 opt_pskey(argc, argv, (stores), (reset), (help)); \
665 argc -= optind; argv += optind; optind = 0; \
668 static int cmd_psget(int transport, int argc, char *argv[])
679 if (strncasecmp(argv[0], "0x", 2)) {
680 pskey = atoi(argv[0]);
683 if (strcasecmp(storage[i].str, argv[0]))
690 pskey = strtol(argv[0] + 2, NULL, 16);
743 static int cmd_psset(int transport, int argc, char *argv[])
754 if (strncasecmp(argv[0], "0x", 2)) {
755 pskey = atoi(argv[0]);
758 if (strcasecmp(storage[i].str, argv[0]))
765 pskey = strtol(argv[0] + 2, NULL, 16);
790 argv++;
799 if (!strncasecmp(argv[0], "0x", 2))
800 value = strtol(argv[0] + 2, NULL, 16);
802 value = atoi(argv[0]);
814 if (!strncasecmp(argv[0], "0x", 2))
815 val32 = strtol(argv[0] + 2, NULL, 16);
817 val32 = atoi(argv[0]);
832 if (!strncasecmp(argv[0], "0x", 2))
833 array[i + 6] = strtol(argv[i] + 2, NULL, 16);
835 array[i + 6] = atoi(argv[i]);
849 static int cmd_psclr(int transport, int argc, char *argv[])
857 if (strncasecmp(argv[0], "0x", 2)) {
858 pskey = atoi(argv[0]);
861 if (strcasecmp(storage[i].str, argv[0]))
868 pskey = strtol(argv[0] + 2, NULL, 16);
886 static int cmd_pslist(int transport, int argc, char *argv[])
931 static int cmd_psread(int transport, int argc, char *argv[])
1000 static int cmd_psload(int transport, int argc, char *argv[])
1009 psr_read(argv[0]);
1048 static int cmd_pscheck(int transport, int argc, char *argv[])
1056 psr_read(argv[0]);
1070 int (*func)(int transport, int argc, char *argv[]);
1144 int main(int argc, char *argv[])
1149 while ((opt=getopt_long(argc, argv, "+t:d:i:h", main_options, NULL)) != EOF) {
1183 argv += optind;
1198 if (strcasecmp(commands[i].str, argv[0]))
1201 err = commands[i].func(transport, argc, argv);