commit bash-20150410 snapshot

This commit is contained in:
Chet Ramey
2015-04-24 16:15:03 -04:00
parent ddece28e53
commit 0385211bb5
34 changed files with 6160 additions and 5935 deletions
+4 -1
View File
@@ -526,7 +526,10 @@ declare_internal (list, local_var)
VSETATTR (var, att_invisible);
}
if (var == 0)
NEXT_VARIABLE ();
{
/* Has to appear in brackets */
NEXT_VARIABLE ();
}
}
/* Can't take an existing array variable and make it a nameref */
else if ((array_p (var) || assoc_p (var)) && (flags_on & att_nameref))
+8
View File
@@ -43,6 +43,8 @@
#include "../execute_cmd.h"
#include "../trap.h"
#include <y.tab.h>
#if defined (HISTORY)
# include "../bashhist.h"
#endif
@@ -71,6 +73,7 @@ extern int indirection_level, subshell_environment;
extern int return_catch_flag, return_catch_value;
extern int last_command_exit_value;
extern int executing_command_builtin;
extern int current_token; /* parse.y */
/* How many `levels' of sourced files we have. */
int sourcelevel = 0;
@@ -302,6 +305,11 @@ file_error_and_exit:
# endif
#endif
/* If we end up with EOF after sourcing a file, which can happen when the file
doesn't end with a newline, pretend that it did. */
if (current_token == yacc_EOF)
push_token ('\n'); /* XXX */
return ((flags & FEVAL_BUILTIN) ? result : 1);
}
+5 -1
View File
@@ -558,7 +558,11 @@ itrace("parse_string: longjmp executed: code = %d", code);
run_unwind_frame (PS_TAG);
if (should_jump_to_top_level)
jump_to_top_level (code);
{
if (parse_and_execute_level == 0)
top_level_cleanup ();
jump_to_top_level (code);
}
return (nc);
}
+1 -1
View File
@@ -189,7 +189,7 @@ source_builtin (list)
{
debug_trap = savestring (debug_trap);
add_unwind_protect (xfree, debug_trap);
add_unwind_protect (set_debug_trap, debug_trap);
add_unwind_protect (maybe_set_debug_trap, debug_trap);
restore_default_signal (DEBUG_TRAP);
}