Ignore:
Timestamp:
2010-07-13T21:54:38Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4003861
Parents:
5f83634 (diff), c0e9f3f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/upa.

File:
1 edited

Legend:

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

    r5f83634 r6b1a85c  
    210210        link_t *pos = NULL;
    211211        const char *hint;
    212         char output[MAX_CMDLINE];
     212        char *output = malloc(MAX_CMDLINE, 0);
    213213       
    214214        output[0] = 0;
     
    235235                str_cpy(input, size, output);
    236236       
     237        free(output);
    237238        return found;
    238239}
     
    245246        wchar_t *current = history[history_pos];
    246247        current[0] = 0;
     248        char *tmp = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
    247249       
    248250        while (true) {
     
    289291                                beg++;
    290292                       
    291                         char tmp[STR_BOUNDS(MAX_CMDLINE)];
    292293                        wstr_to_str(tmp, position - beg + 1, current + beg);
    293294                       
     
    415416        }
    416417       
     418        free(tmp);
    417419        return current;
    418420}
     
    630632                                        cmd->argv[i].vartype = ARG_TYPE_STRING;
    631633                                } else {
    632                                         printf("Wrong synxtax.\n");
     634                                        printf("Wrong syntax.\n");
    633635                                        error = true;
    634636                                }
     
    688690                printf("Type \"exit\" to leave the console.\n");
    689691       
     692        char *cmdline = malloc(STR_BOUNDS(MAX_CMDLINE), 0);
    690693        while (true) {
    691694                wchar_t *tmp = clever_readline((char *) prompt, stdin);
     
    694697                        continue;
    695698               
    696                 char cmdline[STR_BOUNDS(MAX_CMDLINE)];
    697699                wstr_to_str(cmdline, STR_BOUNDS(MAX_CMDLINE), tmp);
    698700               
     
    706708                (void) cmd_info->func(cmd_info->argv);
    707709        }
     710        free(cmdline);
    708711}
    709712
Note: See TracChangeset for help on using the changeset viewer.