Lines Matching refs:argv
80 check_args(const int argc, const char *const argv[], const int required)
83 fprintf(stderr, "Usage: %s helper-name [args]\n", argv[0]);
89 main(int argc, const char *const argv[])
93 check_args(argc, argv, 2);
95 if (strcmp(argv[1], "echo") == 0) {
96 check_args(argc, argv, 3);
97 exitcode = h_echo(argv[2]);
98 } else if (strcmp(argv[1], "exit-failure") == 0)
100 else if (strcmp(argv[1], "exit-signal") == 0)
102 else if (strcmp(argv[1], "exit-success") == 0)
104 else if (strcmp(argv[1], "stdout-stderr") == 0) {
105 check_args(argc, argv, 3);
106 exitcode = h_stdout_stderr(argv[2]);
108 fprintf(stderr, "%s: Unknown helper %s\n", argv[0], argv[1]);