Ignore:
Timestamp:
2009-06-03T19:34:45Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
301ff30
Parents:
69e68e3
Message:

remove redundant index_t and count_t types (which were always quite ambiguous and not actually needed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/kconsole.c

    r69e68e3 r98000fb  
    8787
    8888static wchar_t history[KCONSOLE_HISTORY][MAX_CMDLINE] = {};
    89 static count_t history_pos = 0;
     89static size_t history_pos = 0;
    9090
    9191/** Initialize kconsole data structures
     
    160160
    161161/** Print count times a character */
    162 static void print_cc(wchar_t ch, count_t count)
    163 {
    164         count_t i;
     162static void print_cc(wchar_t ch, size_t count)
     163{
     164        size_t i;
    165165        for (i = 0; i < count; i++)
    166166                putchar(ch);
     
    170170static const char *cmdtab_search_one(const char *name, link_t **startpos)
    171171{
    172         count_t namelen = str_length(name);
     172        size_t namelen = str_length(name);
    173173       
    174174        spinlock_lock(&cmd_lock);
     
    206206        const char *name = input;
    207207       
    208         count_t found = 0;
     208        size_t found = 0;
    209209        link_t *pos = NULL;
    210210        const char *hint;
     
    241241        printf("%s> ", prompt);
    242242       
    243         count_t position = 0;
     243        size_t position = 0;
    244244        wchar_t *current = history[history_pos];
    245245        current[0] = 0;
     
    281281                        /* Find the beginning of the word
    282282                           and copy it to tmp */
    283                         count_t beg;
     283                        size_t beg;
    284284                        for (beg = position - 1; (beg > 0) && (!isspace(current[beg]));
    285285                            beg--);
     
    314314                       
    315315                        size_t off = 0;
    316                         count_t i = 0;
     316                        size_t i = 0;
    317317                        while ((ch = str_decode(tmp, &off, STR_NO_LIMIT)) != 0) {
    318318                                if (!wstr_linsert(current, ch, position + i, MAX_CMDLINE))
     
    543543                if (str_lcmp(hlp->name, cmdline + start,
    544544                    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) {
    546546                        cmd = hlp;
    547547                        break;
     
    569569       
    570570        bool error = false;
    571         count_t i;
     571        size_t i;
    572572        for (i = 0; i < cmd->argc; i++) {
    573573                start = end;
     
    660660        while (true) {
    661661                wchar_t *tmp = clever_readline((char *) prompt, stdin);
    662                 count_t len = wstr_length(tmp);
     662                size_t len = wstr_length(tmp);
    663663                if (!len)
    664664                        continue;
Note: See TracChangeset for help on using the changeset viewer.