mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Minor code tweaks, mostly things like indentation, but also a ferw code reorderings
darcs-hash:20060828120244-ac50b-ad4be149ff245b6f799452f9eeff7bcc60af1526.gz
This commit is contained in:
22
builtin.c
22
builtin.c
@@ -2778,7 +2778,7 @@ static int builtin_switch( wchar_t **argv )
|
||||
current_block->skip=1;
|
||||
current_block->param2.switch_taken=0;
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -2790,7 +2790,7 @@ static int builtin_case( wchar_t **argv )
|
||||
int argc = builtin_count_args( argv );
|
||||
int i;
|
||||
wchar_t *unescaped=0;
|
||||
|
||||
|
||||
if( current_block->type != SWITCH )
|
||||
{
|
||||
sb_printf( sb_err,
|
||||
@@ -2799,30 +2799,30 @@ static int builtin_case( wchar_t **argv )
|
||||
builtin_print_help( argv[0], sb_err );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
current_block->skip = 1;
|
||||
|
||||
|
||||
if( current_block->param2.switch_taken )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
for( i=1; i<argc; i++ )
|
||||
{
|
||||
free( unescaped );
|
||||
|
||||
int match;
|
||||
|
||||
unescaped = parse_util_unescape_wildcards( argv[i] );
|
||||
match = wildcard_match( current_block->param1.switch_value, unescaped );
|
||||
free( unescaped );
|
||||
|
||||
|
||||
if( wildcard_match( current_block->param1.switch_value, unescaped ) )
|
||||
if( match )
|
||||
{
|
||||
current_block->skip = 0;
|
||||
current_block->param2.switch_taken = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
free( unescaped );
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user