Lines Matching refs:argv

74 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()
255 else if (argv[pos][0] == '-' && argv[pos][1] && argv[pos][2] == '\0') in term()
259 value = (argv[pos][0] != '\0'); in term()
278 if ((op < argc - 2) && STREQ (argv[op + 1], "-l")) in binary_operator()
286 if (argv[op][0] == '-') in binary_operator()
289 if ((((argv[op][1] == 'l' || argv[op][1] == 'g') in binary_operator()
290 && (argv[op][2] == 'e' || argv[op][2] == 't')) in binary_operator()
291 || (argv[op][1] == 'e' && argv[op][2] == 'q') in binary_operator()
292 || (argv[op][1] == 'n' && argv[op][2] == 'e')) in binary_operator()
293 && !argv[op][3]) in binary_operator()
298 ? umaxtostr (strlen (argv[op - 1]), lbuf) in binary_operator()
299 : find_int (argv[op - 1])); in binary_operator()
301 ? umaxtostr (strlen (argv[op + 2]), rbuf) in binary_operator()
302 : find_int (argv[op + 1])); in binary_operator()
304 bool xe_operator = (argv[op][2] == 'e'); in binary_operator()
306 return (argv[op][1] == 'l' ? cmp < xe_operator in binary_operator()
307 : argv[op][1] == 'g' ? cmp > - xe_operator in binary_operator()
311 switch (argv[op][1]) in binary_operator()
317 if (argv[op][2] == 't' && !argv[op][3]) in binary_operator()
325 le = get_mtime (argv[op - 1], &lt); in binary_operator()
326 re = get_mtime (argv[op + 1], &rt); in binary_operator()
332 if (argv[op][2] == 'f' && !argv[op][3]) in binary_operator()
338 return (stat (argv[op - 1], &stat_buf) == 0 in binary_operator()
339 && stat (argv[op + 1], &stat_spare) == 0 in binary_operator()
346 if ('t' == argv[op][2] && '\000' == argv[op][3]) in binary_operator()
354 le = get_mtime (argv[op - 1], &lt); in binary_operator()
355 re = get_mtime (argv[op + 1], &rt); in binary_operator()
362 test_syntax_error (_("%s: unknown binary operator"), quote (argv[op])); in binary_operator()
365 if (argv[op][0] == '=' in binary_operator()
366 && (!argv[op][1] || ((argv[op][1] == '=') && !argv[op][2]))) in binary_operator()
368 bool value = STREQ (argv[pos], argv[pos + 2]); in binary_operator()
373 if (STREQ (argv[op], "!=")) in binary_operator()
375 bool value = !STREQ (argv[pos], argv[pos + 2]); in binary_operator()
389 switch (argv[pos][1]) in unary_operator()
392 test_syntax_error (_("%s: unary operator expected"), quote (argv[pos])); in unary_operator()
401 return stat (argv[pos - 1], &stat_buf) == 0; in unary_operator()
405 return euidaccess (argv[pos - 1], R_OK) == 0; in unary_operator()
409 return euidaccess (argv[pos - 1], W_OK) == 0; in unary_operator()
413 return euidaccess (argv[pos - 1], X_OK) == 0; in unary_operator()
418 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
428 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
439 if (stat (argv[pos - 1], &stat_buf) != 0) in unary_operator()
451 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
456 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
461 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
466 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
471 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
476 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
481 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
489 return (lstat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
494 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
499 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
504 return (stat (argv[pos - 1], &stat_buf) == 0 in unary_operator()
512 arg = find_int (argv[pos - 1]); in unary_operator()
520 return argv[pos - 1][0] != 0; in unary_operator()
524 return argv[pos - 1][0] == '\0'; in unary_operator()
541 if (! (pos < argc && STREQ (argv[pos], "-a"))) in and()
560 if (! (pos < argc && STREQ (argv[pos], "-o"))) in or()
582 return argv[pos++][0] != '\0'; in one_argument()
590 if (STREQ (argv[pos], "!")) in two_arguments()
595 else if (argv[pos][0] == '-' in two_arguments()
596 && argv[pos][1] != '\0' in two_arguments()
597 && argv[pos][2] == '\0') in two_arguments()
611 if (binop (argv[pos + 1])) in three_arguments()
613 else if (STREQ (argv[pos], "!")) in three_arguments()
618 else if (STREQ (argv[pos], "(") && STREQ (argv[pos + 2], ")")) in three_arguments()
624 else if (STREQ (argv[pos + 1], "-a") || STREQ (argv[pos + 1], "-o")) in three_arguments()
628 quote (argv[pos + 1])); in three_arguments()
653 if (STREQ (argv[pos], "!")) in posixtest()
659 if (STREQ (argv[pos], "(") && STREQ (argv[pos + 3], ")")) in posixtest()
822 argv = margv; in main()
859 test_syntax_error (_("extra argument %s"), quote (argv[pos])); in main()