Changeset 98000fb in mainline for kernel/generic/src/console/kconsole.c
- Timestamp:
- 2009-06-03T19:34:45Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
r69e68e3 r98000fb 87 87 88 88 static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {}; 89 static count_t history_pos = 0;89 static size_t history_pos = 0; 90 90 91 91 /** Initialize kconsole data structures … … 160 160 161 161 /** Print count times a character */ 162 static void print_cc(wchar_t ch, count_t count)163 { 164 count_t i;162 static void print_cc(wchar_t ch, size_t count) 163 { 164 size_t i; 165 165 for (i = 0; i < count; i++) 166 166 putchar(ch); … … 170 170 static const char *cmdtab_search_one(const char *name, link_t **startpos) 171 171 { 172 count_t namelen = str_length(name);172 size_t namelen = str_length(name); 173 173 174 174 spinlock_lock(&cmd_lock); … … 206 206 const char *name = input; 207 207 208 count_t found = 0;208 size_t found = 0; 209 209 link_t *pos = NULL; 210 210 const char *hint; … … 241 241 printf("%s> ", prompt); 242 242 243 count_t position = 0;243 size_t position = 0; 244 244 wchar_t *current = history[history_pos]; 245 245 current[0] = 0; … … 281 281 /* Find the beginning of the word 282 282 and copy it to tmp */ 283 count_t beg;283 size_t beg; 284 284 for (beg = position - 1; (beg > 0) && (!isspace(current[beg])); 285 285 beg--); … … 314 314 315 315 size_t off = 0; 316 count_t i = 0;316 size_t i = 0; 317 317 while ((ch = str_decode(tmp, &off, STR_NO_LIMIT)) != 0) { 318 318 if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE)) … … 543 543 if (str_lcmp(hlp->name, cmdline + start, 544 544 max(str_length(hlp->name), 545 str_nlength(cmdline + start, ( count_t) (end - start) - 1))) == 0) {545 str_nlength(cmdline + start, (size_t) (end - start) - 1))) == 0) { 546 546 cmd = hlp; 547 547 break; … … 569 569 570 570 bool error = false; 571 count_t i;571 size_t i; 572 572 for (i = 0; i < cmd->argc; i++) { 573 573 start = end; … … 660 660 while (true) { 661 661 wchar_t *tmp = clever_readline((char *) prompt, stdin); 662 count_t len = wstr_length(tmp);662 size_t len = wstr_length(tmp); 663 663 if (!len) 664 664 continue;
Note:
See TracChangeset
for help on using the changeset viewer.