Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3274 → 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;