Home
last modified time | relevance | path

Searched refs:argv (Results 1 – 25 of 111) sorted by relevance

12345

/coreutils/src/
Dtest.c74 static char **argv; /* The argument list. */ variable
126 test_syntax_error (_("missing argument after %s"), quote (argv[argc - 1])); in beyond()
213 while (pos < argc && argv[pos][0] == '!' && argv[pos][1] == '\0') in term()
223 if (argv[pos][0] == '(' && argv[pos][1] == '\0') in term()
230 pos + nargs < argc && ! STREQ (argv[pos + nargs], ")"); in term()
239 if (argv[pos] == 0) in term()
242 if (argv[pos][0] != ')' || argv[pos][1]) in term()
244 quote_n (0, ")"), quote_n (1, argv[pos])); in term()
249 else if (4 <= argc - pos && STREQ (argv[pos], "-l") && binop (argv[pos + 2])) in term()
251 else if (3 <= argc - pos && binop (argv[pos + 1])) in term()
[all …]
Dkill.c108 list_signals (bool table, char *const *argv) in list_signals() argument
132 if (argv) in list_signals()
133 for (; *argv; argv++) in list_signals()
135 signum = operand2sig (*argv, signame); in list_signals()
148 if (argv) in list_signals()
149 for (; *argv; argv++) in list_signals()
151 signum = operand2sig (*argv, signame); in list_signals()
156 if (ISDIGIT (**argv)) in list_signals()
175 send_signals (int signum, char *const *argv) in send_signals() argument
178 char const *arg = *argv; in send_signals()
[all …]
Dlink.c57 main (int argc, char **argv) in main() argument
59 initialize_main (&argc, &argv); in main()
60 set_program_name (argv[0]); in main()
67 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
76 error (0, 0, _("missing operand after %s"), quote (argv[optind])); in main()
82 error (0, 0, _("extra operand %s"), quote (argv[optind + 2])); in main()
86 if (link (argv[optind], argv[optind + 1]) != 0) in main()
88 quoteaf_n (0, argv[optind + 1]), quoteaf_n (1, argv[optind])); in main()
Decho.c112 main (int argc, char **argv) in main() argument
118 || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n"))); in main()
125 initialize_main (&argc, &argv); in main()
126 set_program_name (argv[0]); in main()
137 if (STREQ (argv[1], "--help")) in main()
140 if (STREQ (argv[1], "--version")) in main()
149 ++argv; in main()
152 while (argc > 0 && *argv[0] == '-') in main()
154 char const *temp = argv[0] + 1; in main()
192 argv++; in main()
[all …]
Dcoreutils.c130 main (int argc, char **argv) in main() argument
132 char *prog_name = last_component (argv[0]); in main()
143 launch_program (prog_name, argc, argv); in main()
158 if (STRPREFIX (argv[1], "--coreutils-prog=")) in main()
161 arg_name = prog_name = argv[1] + strlen ("--coreutils-prog="); in main()
163 else if (STRPREFIX (argv[1], "--coreutils-prog-shebang=")) in main()
166 prog_name = argv[1] + strlen ("--coreutils-prog-shebang="); in main()
168 arg_name = last_component (argv[2]); in main()
175 argv[nskip] = arg_name; /* XXX: Discards any specified path. */ in main()
176 launch_program (prog_name, argc - nskip, argv + nskip); in main()
[all …]
Dmknod.c91 main (int argc, char **argv) in main() argument
101 initialize_main (&argc, &argv); in main()
102 set_program_name (argv[0]); in main()
109 while ((optc = getopt_long (argc, argv, "m:Z", longopts, nullptr)) != -1) in main()
168 || (optind + 1 < argc && argv[optind + 1][0] == 'p') in main()
176 error (0, 0, _("missing operand after %s"), quote (argv[argc - 1])); in main()
186 quote (argv[optind + expected_operands])); in main()
210 switch (argv[optind + 1][0]) in main()
231 char const *s_major = argv[optind + 2]; in main()
232 char const *s_minor = argv[optind + 3]; in main()
[all …]
Dunlink.c56 main (int argc, char **argv) in main() argument
58 initialize_main (&argc, &argv); in main()
59 set_program_name (argv[0]); in main()
66 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
78 error (0, 0, _("extra operand %s"), quote (argv[optind + 1])); in main()
82 if (unlink (argv[optind]) != 0) in main()
83 error (EXIT_FAILURE, errno, _("cannot unlink %s"), quoteaf (argv[optind])); in main()
Denv.c258 char **argv; member
276 idx_t string_bytes = (intptr_t) ss->argv[ss->argc]; in splitbuf_grow()
277 ss->argv = xpalloc (ss->argv, &ss->half_alloc, 1, in splitbuf_grow()
278 MIN (INT_MAX, IDX_MAX), 2 * sizeof *ss->argv); in splitbuf_grow()
279 memmove (ss->argv + ss->half_alloc, ss->argv + old_half_alloc, string_bytes); in splitbuf_grow()
286 idx_t string_bytes = (intptr_t) ss->argv[ss->argc]; in splitbuf_append_byte()
287 if (ss->half_alloc * sizeof *ss->argv <= string_bytes) in splitbuf_append_byte()
289 ((char *) (ss->argv + ss->half_alloc))[string_bytes] = c; in splitbuf_append_byte()
290 ss->argv[ss->argc] = (char *) (intptr_t) (string_bytes + 1); in splitbuf_append_byte()
304 ss->argv[argc + 1] = ss->argv[argc]; in check_start_new_arg()
[all …]
Dprintf.c488 print_formatted (char const *format, int argc, char **argv) in print_formatted() argument
519 print_esc_string (*argv); in print_formatted()
520 ++argv; in print_formatted()
530 fputs (quotearg_style (shell_escape_quoting_style, *argv), in print_formatted()
532 ++argv; in print_formatted()
572 intmax_t width = vstrtoimax (*argv); in print_formatted()
577 quote (*argv)); in print_formatted()
578 ++argv; in print_formatted()
602 intmax_t prec = vstrtoimax (*argv); in print_formatted()
612 quote (*argv)); in print_formatted()
[all …]
Dcoreutils-dir.c25 int single_binary_main_ls (int argc, char **argv);
26 int single_binary_main_dir (int argc, char **argv);
29 single_binary_main_dir (int argc, char **argv) in single_binary_main_dir() argument
32 return single_binary_main_ls (argc, argv); in single_binary_main_dir()
Dcoreutils-arch.c25 int single_binary_main_uname (int argc, char **argv);
26 int single_binary_main_arch (int argc, char **argv);
29 single_binary_main_arch (int argc, char **argv) in single_binary_main_arch() argument
32 return single_binary_main_uname (argc, argv); in single_binary_main_arch()
Dcoreutils-vdir.c25 int single_binary_main_ls (int argc, char **argv);
26 int single_binary_main_vdir (int argc, char **argv);
29 single_binary_main_vdir (int argc, char **argv) in single_binary_main_vdir() argument
32 return single_binary_main_ls (argc, argv); in single_binary_main_vdir()
Dgroups.c67 main (int argc, char **argv) in main() argument
74 initialize_main (&argc, &argv); in main()
75 set_program_name (argv[0]); in main()
85 while ((optc = getopt_long (argc, argv, "", longopts, nullptr)) != -1) in main()
126 struct passwd *pwd = getpwnam (argv[optind]); in main()
129 error (0, 0, _("%s: no such user"), quote (argv[optind])); in main()
136 printf ("%s : ", argv[optind]); in main()
137 if (!print_group_list (argv[optind], ruid, rgid, egid, true, ' ')) in main()
Dmkfifo.c75 main (int argc, char **argv) in main() argument
84 initialize_main (&argc, &argv); in main()
85 set_program_name (argv[0]); in main()
92 while ((optc = getopt_long (argc, argv, "m:Z", longopts, nullptr)) != -1) in main()
170 defaultcon (set_security_context, argv[optind], S_IFIFO); in main()
171 if (mkfifo (argv[optind], newmode) != 0) in main()
173 error (0, errno, _("cannot create fifo %s"), quoteaf (argv[optind])); in main()
176 else if (specified_mode && lchmod (argv[optind], newmode) != 0) in main()
179 quoteaf (argv[optind])); in main()
Dhostid.c53 main (int argc, char **argv) in main() argument
57 initialize_main (&argc, &argv); in main()
58 set_program_name (argv[0]); in main()
65 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
71 error (0, 0, _("extra operand %s"), quote (argv[optind])); in main()
Dhostname.c73 main (int argc, char **argv) in main() argument
77 initialize_main (&argc, &argv); in main()
78 set_program_name (argv[0]); in main()
85 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
91 error (0, 0, _("extra operand %s"), quote (argv[optind + 1])); in main()
98 char const *name = argv[optind]; in main()
Dtrue.c55 main (int argc, char **argv) in main() argument
61 initialize_main (&argc, &argv); in main()
62 set_program_name (argv[0]); in main()
71 if (STREQ (argv[1], "--help")) in main()
74 if (STREQ (argv[1], "--version")) in main()
Dnice.c100 main (int argc, char **argv) in main() argument
108 initialize_main (&argc, &argv); in main()
109 set_program_name (argv[0]); in main()
119 char const *s = argv[i]; in main()
130 char **fake_argv = argv + (i - 1); in main()
133 fake_argv[0] = argv[0]; in main()
215 execvp (argv[i], &argv[i]); in main()
218 error (0, errno, "%s", quote (argv[i])); in main()
Dbasename.c123 main (int argc, char **argv) in main() argument
129 initialize_main (&argc, &argv); in main()
130 set_program_name (argv[0]); in main()
139 int c = getopt_long (argc, argv, "+as:z", longopts, nullptr); in main()
175 error (0, 0, _("extra operand %s"), quote (argv[optind + 2])); in main()
182 perform_basename (argv[optind], suffix, use_nuls); in main()
185 perform_basename (argv[optind], in main()
186 optind + 2 == argc ? argv[optind + 1] : nullptr, in main()
Dlogname.c50 main (int argc, char **argv) in main() argument
54 initialize_main (&argc, &argv); in main()
55 set_program_name (argv[0]); in main()
62 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
68 error (0, 0, _("extra operand %s"), quote (argv[optind])); in main()
Dsleep.c95 main (int argc, char **argv) in main() argument
100 initialize_main (&argc, &argv); in main()
101 set_program_name (argv[0]); in main()
108 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
122 if (! (xstrtod (argv[i], &p, &s, cl_strtod) || errno == ERANGE) in main()
130 error (0, 0, _("invalid time interval %s"), quote (argv[i])); in main()
Dprintenv.c81 main (int argc, char **argv) in main() argument
90 initialize_main (&argc, &argv); in main()
91 set_program_name (argv[0]); in main()
99 while ((optc = getopt_long (argc, argv, "+iu:0", longopts, nullptr)) != -1) in main()
128 if (strchr (argv[i], '=')) in main()
134 ap = argv[i]; in main()
Dwhoami.c56 main (int argc, char **argv) in main() argument
62 initialize_main (&argc, &argv); in main()
63 set_program_name (argv[0]); in main()
70 parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, in main()
76 error (0, 0, _("extra operand %s"), quote (argv[optind])); in main()
Druncon.c104 main (int argc, char **argv) in main() argument
118 initialize_main (&argc, &argv); in main()
119 set_program_name (argv[0]); in main()
130 int c = getopt_long (argc, argv, "+r:t:u:l:c", long_options, in main()
184 context = argv[optind++]; in main()
213 if (getfilecon (argv[optind], &file_context) == -1) in main()
216 quoteaf (argv[optind])); in main()
258 (compute_trans ? execv : execvp) (argv[optind], argv + optind); in main()
261 error (0, errno, "%s", quote (argv[optind])); in main()
/coreutils/src/blake2/
Db2sum.c240 static void usage( char **argv, int errcode )
243 fprintf( out, "Usage: %s [OPTION]... [FILE]...\n", argv[0] );
257 int main( int argc, char **argv )
279 c = getopt_long( argc, argv, "a:l:", long_options, &option_index );
311 usage( argv, 111 );
321 usage( argv, 111 );
328 usage( argv, 0 );
334 usage( argv, 1 );
343 usage( argv, 111 );
349 argv[argc++] = (char *) "-";
[all …]

12345