--- src/execute_cmd.c~ 2002-03-18 19:24:22.000000000 +0100 +++ src/execute_cmd.c 2003-05-25 22:08:02.000000000 +0200 @@ -286,12 +286,18 @@ { if (currently_executing_command->type == cm_simple) return currently_executing_command->value.Simple->line; +#if defined (COND_COMMAND) else if (currently_executing_command->type == cm_cond) return currently_executing_command->value.Cond->line; +#endif +#if defined (DPAREN_ARITHMETIC) else if (currently_executing_command->type == cm_arith) return currently_executing_command->value.Arith->line; +#endif +#if defined (ARITH_FOR_COMMAND) else if (currently_executing_command->type == cm_arith_for) return currently_executing_command->value.ArithFor->line; +#endif else return line_number; } @@ -801,7 +807,7 @@ exec_result = execute_cond_command (command->value.Cond); break; #endif - + case cm_function_def: exec_result = execute_intern_function (command->value.Function_def->name, command->value.Function_def->command); @@ -916,7 +922,7 @@ characters after the decimal point, the optional `l' means to format using minutes and seconds (MMmNN[.FF]s), like the `times' builtin', and the last character is one of - + R number of seconds of `real' time U number of seconds of `user' time S number of seconds of `system' time @@ -2351,7 +2357,7 @@ #if 0 debug_print_cond_command (cond_command); #endif - last_command_exit_value = result = execute_cond_node (cond_command); + last_command_exit_value = result = execute_cond_node (cond_command); return (result); } #endif /* COND_COMMAND */ @@ -2808,7 +2814,7 @@ push_scope (VC_BLTNENV, temporary_env); if (subshell == 0) add_unwind_protect (pop_scope, "1"); - temporary_env = (HASH_TABLE *)NULL; + temporary_env = (HASH_TABLE *)NULL; } } @@ -2881,7 +2887,7 @@ debug_trap = TRAP_STRING(DEBUG_TRAP); error_trap = TRAP_STRING(ERROR_TRAP); - + /* The order of the unwind protects for debug_trap and error_trap is important here! unwind-protect commands are run in reverse order of registration. If this causes problems, take out the xfree @@ -2960,7 +2966,7 @@ bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE); begin_unwind_frame ("execute-shell-function"); add_unwind_protect (dispose_fd_bitmap, (char *)bitmap); - + ret = execute_function (var, words, 0, bitmap, 0, 0); dispose_fd_bitmap (bitmap); @@ -3115,7 +3121,7 @@ if (saved_undo_list) dispose_redirects (saved_undo_list); redirection_undo_list = exec_redirection_undo_list; - saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL; + saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL; discard_unwind_frame ("saved_redirects"); } @@ -3363,7 +3369,7 @@ /* If there is more text on the line, then it is an argument for the interpreter. */ - if (STRINGCHAR(i)) + if (STRINGCHAR(i)) { for (start = i; STRINGCHAR(i); i++) ; @@ -3458,7 +3464,7 @@ len = -1; \ } \ while (0) - + /* Call execve (), handling interpreting shell scripts, and handling exec failures. */ int