diff options
author | axel <axel@liljencrantz.se> | 2006-02-12 23:18:46 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-02-12 23:18:46 +1000 |
commit | b6cd723eb7cd6586063e7d5c35e63828c9310906 (patch) | |
tree | e16e5711898625f7208b3b8eff92b7ea6f93843d /highlight.c | |
parent | a2cd8c8a8dfc8b3acc208bb1113260cb69ca03d1 (diff) |
Fix a few compiler warnings, add halloc debug output on exit if HALLOC_DEBUG is defined and other minor tweaks
darcs-hash:20060212131846-ac50b-128685d1c043697768be70631c736567544abf2c.gz
Diffstat (limited to 'highlight.c')
-rw-r--r-- | highlight.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/highlight.c b/highlight.c index 1a7156d6..51f33665 100644 --- a/highlight.c +++ b/highlight.c @@ -130,10 +130,10 @@ void highlight_shell( wchar_t * buff, /* Command. First check that the command actually exists. */ - wchar_t *cmd = - (last_type == TOK_STRING) ? - expand_one( 0, wcsdup(tok_last( &tok )),EXPAND_SKIP_SUBSHELL | EXPAND_SKIP_VARIABLES) : - wcsdup(tok_last( &tok )); + wchar_t *cmd = expand_one( 0, + wcsdup(tok_last( &tok )), + EXPAND_SKIP_SUBSHELL | EXPAND_SKIP_VARIABLES); + if( cmd == 0 ) { color[ tok_get_pos( &tok ) ] = HIGHLIGHT_ERROR; @@ -145,7 +145,6 @@ void highlight_shell( wchar_t * buff, int is_subcommand = 0; int mark = tok_get_pos( &tok ); color[ tok_get_pos( &tok ) ] = HIGHLIGHT_COMMAND; - if( parser_is_subcommand( cmd ) ) { |