Changeset 3550c393 in mainline for generic/src/console/kconsole.c


Ignore:
Timestamp:
2005-12-11T21:36:42Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba276f7
Parents:
0c8e692
Message:

Symtab returns correct addresses even when symtab is befor bss.
Some tab completion optimization.

File:
1 edited

Legend:

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

    r0c8e692 r3550c393  
    216216                return 0;
    217217
    218         if (found > 1) {
     218        if (found > 1 && !strlen(output)) {
    219219                printf("\n");
    220220                startpos = NULL;
     
    287287                        for (i=0;tmp[i] && curlen < MAX_CMDLINE;i++,curlen++)
    288288                                insert_char(current, tmp[i], i+position);
    289                         if (found == 1) { /* One match */
    290                                 for (i=position;i<curlen;i++)
     289
     290                        if (strlen(tmp) || found==1) { /* If we have a hint */
     291                                for (i=position;i<curlen;i++)
    291292                                        putchar(current[i]);
    292293                                position += strlen(tmp);
    293294                                /* Add space to end */
    294                                 if (position == curlen && curlen < MAX_CMDLINE) {
     295                                if (found == 1 && position == curlen && \
     296                                    curlen < MAX_CMDLINE) {
    295297                                        current[position] = ' ';
    296298                                        curlen++;
     
    298300                                        putchar(' ');
    299301                                }
    300                         } else {
     302                        } else { /* No hint, table was printed */
    301303                                printf("%s> ", prompt);
    302304                                for (i=0; i<curlen;i++)
Note: See TracChangeset for help on using the changeset viewer.