Lines Matching refs:argv

490 extern int b_open(int argc, char *argv[], void *extra)
501 while (n = optget(argv, sh_optopen)) switch (n)
558 argv += opt_info.index;
572 fd = sh_open(argv[1], oflag, mode);
574 errormsg(SH_DICT, ERROR_system(1), "%s: open failed", argv[1]);
579 np = nv_open(argv[0], shp->var_tree, NV_ARRAY|NV_VARNAME|NV_NOASSIGN);
586 fdp->name = strdup(argv[1]);
606 extern int b_close(int argc, char *argv[], void *extra)
611 while (n = optget(argv, sh_optclose)) switch (n)
621 argv += opt_info.index;
626 fd = strtol(argv[0], (char **)NULL, 0);
628 errormsg(SH_DICT, ERROR_system(1), "%s: invalid descriptor", argv[0]);
633 errormsg(SH_DICT, ERROR_system(1), "%s: close error", argv[0]);
661 extern int b_tmpfile(int argc, char *argv[], void *extra)
670 while (n = optget(argv, sh_opttmpfile)) switch (n)
686 argv += opt_info.index;
692 errormsg(SH_DICT, ERROR_system(1), "%s: tmpfile failed", argv[1]);
696 errormsg(SH_DICT, ERROR_system(1), "%s: tmpfile failed", argv[1]);
702 np = nv_open(argv[0], shp->var_tree, NV_ARRAY|NV_VARNAME|NV_NOASSIGN);
737 extern int b_dup(int argc, char *argv[], void *extra)
745 while (n = optget(argv, sh_optdup)) switch (n)
761 argv += opt_info.index;
766 ffd = strtol(argv[1], (char **)NULL, 0);
768 errormsg(SH_DICT, ERROR_system(1), "%s: invalid fd", argv[1]);
772 errormsg(SH_DICT, ERROR_system(1), "%s: dup failed", argv[1]);
777 np = nv_open(argv[0],shp->var_tree,NV_ARRAY|NV_VARNAME|NV_NOASSIGN);
812 extern int b_stat(int argc, char *argv[], void *extra)
820 while (n = optget(argv, sh_optstat)) switch (n)
833 argv += opt_info.index;
839 if(lstat(argv[1], &statb) < 0)
840 errormsg(SH_DICT, ERROR_system(1), "%s: stat failed", argv[1]);
844 if(stat(argv[1], &statb) < 0)
845 errormsg(SH_DICT, ERROR_system(1), "%s: stat failed", argv[1]);
849 np = nv_open(argv[0],shp->var_tree,NV_ARRAY|NV_VARNAME|NV_NOASSIGN);
856 fdp->name = strdup(argv[1]);
878 extern int b_rewind(int argc, char *argv[], void *extra)
883 while (n = optget(argv, sh_optrewind)) switch (n)
893 argv += opt_info.index;
898 fd = strtol(argv[0], (char **)NULL, 0);
900 errormsg(SH_DICT, ERROR_system(1), "%s: invalid fd", argv[0]);