Lines Matching refs:cmd
81 char *cmd; /* the current command */
104 char cmd[BUFSIZ];
126 getcmd(curdir, cmd, name, sizeof(name), &arglist);
127 switch (cmd[0]) {
132 if (strncmp(cmd, "add", strlen(cmd)) != 0)
145 if (strncmp(cmd, "cd", strlen(cmd)) != 0)
160 if (strncmp(cmd, "delete", strlen(cmd)) != 0)
173 if (strncmp(cmd, "extract", strlen(cmd)) != 0)
186 if (strncmp(cmd, "help", strlen(cmd)) != 0)
212 if (strncmp(cmd, "ls", strlen(cmd)) != 0)
220 if (strncmp(cmd, "pwd", strlen(cmd)) != 0)
231 if (strncmp(cmd, "quit", strlen(cmd)) != 0)
235 if (strncmp(cmd, "xit", strlen(cmd)) != 0)
242 if (strncmp(cmd, "verbose", strlen(cmd)) != 0)
256 if (strncmp(cmd, "setmodes", strlen(cmd)) != 0)
264 if (strncmp(cmd, "what", strlen(cmd)) != 0)
272 if (strncmp(cmd, "Debug", strlen(cmd)) != 0)
287 fprintf(stderr, "%s: unknown command; type ? for help\n", cmd);
295 * The first word on the line is assigned to "cmd". If
305 getcmd(char *curdir, char *cmd, char *name, size_t size, struct arglist *ap)
326 strcpy(cmd, "quit");
334 * Copy the command into "cmd".
336 cp = copynext(input, cmd);
337 ap->cmd = cmd;
371 fprintf(stderr, "%s: out of memory\n", ap->cmd);
374 fprintf(stderr, "%s %s: no such file or directory\n", ap->cmd, name);