Imported from ../bash-2.01.1.tar.gz.
This commit is contained in:
parent
d166f04881
commit
e8ce775db8
50 changed files with 2170 additions and 1502 deletions
|
@ -97,8 +97,11 @@ mkbuiltins: $(srcdir)/mkbuiltins.c ../config.h
|
|||
common.o: common.c
|
||||
bashgetopt.o: bashgetopt.c
|
||||
getopt.o: getopt.c
|
||||
evalstring.o: evalstring.c
|
||||
evalfile.o: evalfile.c
|
||||
|
||||
ulimit.o: ulimit.def pipesize.h
|
||||
ulimit.o: ulimit.def
|
||||
ulimit.o: pipesize.h
|
||||
|
||||
pipesize.h: psize.aux
|
||||
$(SHELL) $(srcdir)/psize.sh > pipesize.h
|
||||
|
@ -149,6 +152,7 @@ return.o: return.def
|
|||
set.o: set.def
|
||||
setattr.o: setattr.def
|
||||
shift.o: shift.def
|
||||
shopt.o: shopt.def
|
||||
source.o: source.def
|
||||
suspend.o: suspend.def
|
||||
test.o: test.def
|
||||
|
|
|
@ -369,8 +369,10 @@ declare_internal (list, local_var)
|
|||
assign_array_var_from_string (var, value);
|
||||
else
|
||||
#endif
|
||||
/* This essentially duplicates the internals of bind_variable() */
|
||||
if (offset)
|
||||
{
|
||||
var->attributes &= ~att_invisible;
|
||||
t = make_variable_value (var, value);
|
||||
FREE (var->value);
|
||||
var->value = t;
|
||||
|
|
|
@ -160,7 +160,9 @@ parse_and_execute (string, from_file, flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
dispose_command (command); /* XXX */
|
||||
#if 0
|
||||
dispose_command (command); /* pe_dispose does this */
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -192,7 +194,8 @@ parse_and_execute (string, from_file, flags)
|
|||
#if defined (ONESHOT)
|
||||
if (startup_state == 2 && *bash_input.location.string == '\0' &&
|
||||
command->type == cm_simple && !command->redirects &&
|
||||
!command->value.Simple->redirects)
|
||||
!command->value.Simple->redirects &&
|
||||
((command->flags & CMD_TIME_PIPELINE) == 0))
|
||||
{
|
||||
command->flags |= CMD_NO_FORK;
|
||||
command->value.Simple->flags |= CMD_NO_FORK;
|
||||
|
|
|
@ -46,6 +46,8 @@ $END
|
|||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "../shell.h"
|
||||
#include "common.h"
|
||||
#include "bashgetopt.h"
|
||||
|
@ -55,6 +57,10 @@ $END
|
|||
#include <readline/readline.h>
|
||||
#endif
|
||||
|
||||
#if !defined(errno)
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
#define issep(c) (strchr (ifs_chars, (c)))
|
||||
|
||||
extern int interrupt_immediately;
|
||||
|
@ -180,8 +186,11 @@ read_builtin (list)
|
|||
c = rlbuf[rlind++];
|
||||
}
|
||||
else
|
||||
#endif
|
||||
if (read (0, &c, 1) != 1)
|
||||
#endif
|
||||
|
||||
while (((retval = read (0, &c, 1)) < 0) && errno == EINTR)
|
||||
;
|
||||
if (retval <= 0)
|
||||
{
|
||||
eof = 1;
|
||||
break;
|
||||
|
|
|
@ -326,7 +326,7 @@ show_var_attributes (var, pattr, nodefs)
|
|||
printf ("%s\n", named_function_string (var->name, function_cell (var), 1));
|
||||
else
|
||||
{
|
||||
x = double_quote (value_cell (var));
|
||||
x = double_quote (value_cell (var) ? value_cell (var) : "");
|
||||
printf ("%s=%s\n", var->name, x);
|
||||
free (x);
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ set_var_attribute (name, attribute, undo)
|
|||
{
|
||||
if (tv = find_tempenv_variable (name))
|
||||
{
|
||||
var = bind_variable (tv->name, tv->value);
|
||||
var = bind_variable (tv->name, tv->value ? tv->value : "");
|
||||
dispose_variable (tv);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -191,7 +191,7 @@ static void
|
|||
showtrap (i)
|
||||
int i;
|
||||
{
|
||||
char *t, *p;
|
||||
char *t, *p, *sn;
|
||||
|
||||
p = trap_list[i];
|
||||
|
||||
|
@ -199,9 +199,15 @@ showtrap (i)
|
|||
return;
|
||||
|
||||
t = (p == (char *)IGNORE_SIG) ? (char *)NULL : single_quote (p);
|
||||
printf ("trap -- %s %s\n", t ? t : "''", signal_name (i));
|
||||
if (t)
|
||||
free (t);
|
||||
sn = signal_name (i);
|
||||
/* Make sure that signals whose names are unknown (for whatever reason)
|
||||
are printed as signal numbers. */
|
||||
if (STREQN (sn, "SIGJUNK", 7) || STREQN (sn, "unknown", 7))
|
||||
printf ("trap -- %s %d\n", t ? t : "''", i);
|
||||
else
|
||||
printf ("trap -- %s %s\n", t ? t : "''", sn);
|
||||
|
||||
FREE (t);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue