diff --git a/complete.c b/complete.c index 09ab7d627..35c6c7a16 100644 --- a/complete.c +++ b/complete.c @@ -1977,7 +1977,7 @@ void complete( const wchar_t *cmd, int old_error_max = error_max; int done=0; - + error_max=0; /** @@ -1995,7 +1995,6 @@ void complete( const wchar_t *cmd, done=1; } - /* Set on_command to true if cursor is over a command, and set the name of the current command, and various other parsing to find @@ -2021,7 +2020,6 @@ void complete( const wchar_t *cmd, done=1; } - if( !done ) { int had_cmd=0; @@ -2029,8 +2027,6 @@ void complete( const wchar_t *cmd, tok_init( &tok, buff, TOK_ACCEPT_UNFINISHED ); - free( buff ); - while( !end_loop ) { switch( tok_last_type( &tok ) ) @@ -2053,7 +2049,7 @@ void complete( const wchar_t *cmd, case TOK_BACKGROUND: had_cmd=0; break; - + case TOK_ERROR: end_loop=1; @@ -2068,7 +2064,7 @@ void complete( const wchar_t *cmd, } tok_destroy( &tok ); - + free( buff ); /* Get the string to complete diff --git a/reader.c b/reader.c index dfc137f7e..dc19a006f 100644 --- a/reader.c +++ b/reader.c @@ -2389,7 +2389,7 @@ static int read_i() wchar_t *reader_readline() { - wchar_t c; + wint_t c; int i; int last_char=0, yank=0; wchar_t *yank_str; @@ -2426,15 +2426,15 @@ wchar_t *reader_readline() reader_save_status(); /* - Sometimes strange input sequences seem to generate a zero - byte. I believe these simply mean a character was pressed - but it should be ignored. (Example: Trying to add a tilde - (~) to digit) + Sometimes strange input sequences seem to generate a zero + byte. I believe these simply mean a character was pressed + but it should be ignored. (Example: Trying to add a tilde + (~) to digit) */ check_winch(); while( (c=input_readch()) == 0 ) ; - + check_winch(); reader_check_status();