Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3273 → Rev 3275

/branches/shell/uspace/app/bdsh/input.c
69,7 → 69,7
return CL_EFAIL;
 
tmp = cli_strdup(usr->line);
cli_verbose("Tok: tmp = %s", tmp);
 
/* Break up what the user typed, space delimited */
cmd[n] = cli_strtok(tmp, " ");
while (cmd[n] && n < WORD_MAX) {
76,9 → 76,6
cmd[++n] = cli_strtok(NULL, " ");
}
 
for (n = 0; cmd[n] != NULL; n++)
cli_verbose("arg[%d] => `%s'", n, cmd[n]);
 
/* We have rubbish */
if (NULL == cmd[0]) {
rc = CL_ENOENT;
114,7 → 111,6
}
 
finit:
/* Why is free complaining about these ?
if (NULL != usr->line) {
free(usr->line);
usr->line = (char *) NULL;
121,7 → 117,7
}
if (NULL != tmp)
free(tmp);
*/
 
return rc;
}
 
168,7 → 164,7
#endif
len = strlen(line);
/* Make sure we don't have rubbish or a C/R happy user */
if (len == 0)
if (len == 0 || line[0] == '\n')
return;
if (len == 1 && line[len-1] == '\n')
return;
/branches/shell/uspace/app/bdsh/config.h
25,9 → 25,9
 
/* Leftovers from Autoconf */
#define PACKAGE_MAINTAINER "Tim Post"
#define PACKAGE_BUGREPORT "tinkertim@gmail.com"
#define PACKAGE_NAME "scli"
#define PACKAGE_STRING "scli 0.0.1"
#define PACKAGE_BUGREPORT "echo@echoreply.us"
#define PACKAGE_NAME "bdsh"
#define PACKAGE_STRING "The brain dead shell"
#define PACKAGE_TARNAME "scli"
#define PACKAGE_VERSION "0.0.1"
 
/branches/shell/uspace/app/bdsh/scli.c
125,11 → 125,13
if (cli_init(&usr))
exit(EXIT_FAILURE);
 
printf("Welcome to %s - %s\nType `help' at any time for usage information.\n",
progname, PACKAGE_STRING);
 
while (!cli_quit) {
cli_set_prompt(&usr);
get_input(&usr);
if (NULL != usr.line) {
cli_verbose("Sending %s to tokenizer", usr.line);
ret = tok_input(&usr);
usr.lasterr = ret;
}