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