Lines Matching refs:argv
45 uchar *cmdname; /* gets argv[0] for error messages */
56 main(int argc, char *argv[], char *envp[])
71 cmdname = (uchar *)argv[0];
81 while (argc > 1 && argv[1][0] == '-' && argv[1][1] != '\0') {
82 if (strcmp(argv[1], "--") == 0) {
85 argv++;
88 switch (argv[1][1]) {
91 argv++;
97 pfile[npfile++] = (uchar *)argv[1];
100 if (argv[1][2] != 0) { /* arg is -Fsomething */
102 if (argv[1][2] == 't' && argv[1][3] == 0)
104 else if (argv[1][2] != 0)
105 fs = (uchar *)&argv[1][2];
107 argc--; argv++;
110 if (argv[1][0] == 't' &&
111 argv[1][1] == 0)
113 else if (argv[1][0] != 0)
114 fs = (uchar *)&argv[1][0];
121 if (argv[1][2] == '\0' && --argc > 1 &&
122 isclvar((uchar *)(++argv)[1]))
123 setclvar((uchar *)argv[1]);
126 dbg = atoi(&argv[1][2]);
132 ERROR "unknown option %s ignored", argv[1] WARNING;
136 argv++;
138 /* argv[1] is now the first argument */
145 dprintf(("program = |%s|\n", argv[1]));
146 lexprog = (uchar *)argv[1];
148 argv++;
151 argv[0] = (char *)cmdname; /* put prog name at front of arglist */
152 dprintf(("argc=%d, argv[0]=%s\n", argc, argv[0]));
153 arginit(argc, (uchar **)argv);