Changeset 98000fb in mainline for kernel/generic/src/console
- Timestamp:
- 2009-06-03T19:34:45Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 301ff30
- Parents:
- 69e68e3
- Location:
- kernel/generic/src/console
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/cmd.c
r69e68e3 r98000fb 514 514 515 515 link_t *cur; 516 count_t len = 0;516 size_t len = 0; 517 517 for (cur = cmd_head.next; cur != &cmd_head; cur = cur->next) { 518 518 cmd_info_t *hlp; … … 652 652 */ 653 653 654 count_t i;654 size_t i; 655 655 for (i = 0; i < config.cpu_count; i++) { 656 656 if (!cpus[i].active) … … 971 971 int cmd_tests(cmd_arg_t *argv) 972 972 { 973 count_t len = 0;973 size_t len = 0; 974 974 test_t *test; 975 975 for (test = tests; test->name != NULL; test++) { -
kernel/generic/src/console/console.c
r69e68e3 r98000fb 62 62 static bool klog_inited = false; 63 63 /** First kernel log characters */ 64 static index_t klog_start = 0;64 static size_t klog_start = 0; 65 65 /** Number of valid kernel log characters */ 66 66 static size_t klog_len = 0; … … 171 171 * 172 172 */ 173 count_t gets(indev_t *indev, char *buf, size_t buflen)173 size_t gets(indev_t *indev, char *buf, size_t buflen) 174 174 { 175 175 size_t offset = 0; 176 count_t count = 0;176 size_t count = 0; 177 177 buf[offset] = 0; 178 178 … … 227 227 if ((klog_stored > 0) && (stdout) && (stdout->op->write)) { 228 228 /* Print charaters stored in kernel log */ 229 index_t i;229 size_t i; 230 230 for (i = klog_len - klog_stored; i < klog_len; i++) 231 231 stdout->op->write(stdout, klog[(klog_start + i) % KLOG_LENGTH], silent); -
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.
