Rev 4264 | Rev 4486 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4264 | Rev 4266 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | char *tmp; |
59 | char *tmp; |
60 | 60 | ||
61 | if (NULL == usr->line) |
61 | if (NULL == usr->line) |
62 | return CL_EFAIL; |
62 | return CL_EFAIL; |
63 | 63 | ||
64 | tmp = strdup(usr->line); |
64 | tmp = str_dup(usr->line); |
65 | 65 | ||
66 | cmd[n] = strtok(tmp, " "); |
66 | cmd[n] = strtok(tmp, " "); |
67 | while (cmd[n] && n < WORD_MAX) { |
67 | while (cmd[n] && n < WORD_MAX) { |
68 | cmd[++n] = strtok(NULL, " "); |
68 | cmd[++n] = strtok(NULL, " "); |
69 | } |
69 | } |
Line 153... | Line 153... | ||
153 | 153 | ||
154 | read_line(line, INPUT_MAX); |
154 | read_line(line, INPUT_MAX); |
155 | /* Make sure we don't have rubbish or a C/R happy user */ |
155 | /* Make sure we don't have rubbish or a C/R happy user */ |
156 | if (str_cmp(line, "") == 0 || str_cmp(line, "\n") == 0) |
156 | if (str_cmp(line, "") == 0 || str_cmp(line, "\n") == 0) |
157 | return; |
157 | return; |
158 | usr->line = strdup(line); |
158 | usr->line = str_dup(line); |
159 | 159 | ||
160 | return; |
160 | return; |
161 | } |
161 | } |
162 | 162 |