Lines Matching defs:cmd
79 char *cmd; /* the current command */
102 char cmd[BUFSIZ];
124 getcmd(curdir, cmd, name, sizeof(name), &arglist);
125 switch (cmd[0]) {
130 if (strncmp(cmd, "add", strlen(cmd)) != 0)
143 if (strncmp(cmd, "cd", strlen(cmd)) != 0)
158 if (strncmp(cmd, "delete", strlen(cmd)) != 0)
171 if (strncmp(cmd, "extract", strlen(cmd)) != 0)
184 if (strncmp(cmd, "help", strlen(cmd)) != 0)
210 if (strncmp(cmd, "ls", strlen(cmd)) != 0)
218 if (strncmp(cmd, "pwd", strlen(cmd)) != 0)
229 if (strncmp(cmd, "quit", strlen(cmd)) != 0)
233 if (strncmp(cmd, "xit", strlen(cmd)) != 0)
240 if (strncmp(cmd, "verbose", strlen(cmd)) != 0)
254 if (strncmp(cmd, "setmodes", strlen(cmd)) != 0)
262 if (strncmp(cmd, "what", strlen(cmd)) != 0)
270 if (strncmp(cmd, "Debug", strlen(cmd)) != 0)
285 fprintf(stderr, "%s: unknown command; type ? for help\n", cmd);
293 * The first word on the line is assigned to "cmd". If
303 getcmd(char *curdir, char *cmd, char *name, size_t size, struct arglist *ap)
324 strcpy(cmd, "quit");
332 * Copy the command into "cmd".
334 cp = copynext(input, cmd);
335 ap->cmd = cmd;
369 fprintf(stderr, "%s: out of memory\n", ap->cmd);
372 fprintf(stderr, "%s %s: no such file or directory\n", ap->cmd, name);