From 10a5f6b4cc41a4cff0d37768f7f45be657056c7b Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 7 Dec 2011 09:01:16 -0500 Subject: [PATCH] commit bash-20061206 snapshot --- CWRU/CWRU.chlog | 4 ++-- doc/bash.1 | 15 +++++++++++---- doc/bashref.texi | 9 +++++---- lib/sh/snprintf.c | 9 ++++----- tests/RUN-ONE-TEST | 2 +- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 173e876c5..6382012e9 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -13774,7 +13774,7 @@ shell.c doc/bashref.texi - - fix typos and misspellings sent in by Brian Gough + - fixes for typos and misspellings sent in by Brian Gough 10/24 ----- @@ -13829,7 +13829,7 @@ execute_cmd.c 11/7 ---- lib/tilde/tilde.c -lib/readline/{util,undo,callback,input,isearch,kill +lib/readline/{util,undo,callback,input,isearch,kill}.c - make sure that memory allocated with xmalloc is freed with xfree 11/9 diff --git a/doc/bash.1 b/doc/bash.1 index bd29b8aac..bbf08ed9b 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -5985,8 +5985,9 @@ no alias has been defined. Resume each suspended job \fIjobspec\fP in the background, as if it had been started with .BR & . -If \fIjobspec\fP is not present, the shell's notion of the -\fIcurrent job\fP is used. +If +.I jobspec +is not present, the shell's notion of the \fIcurrent job\fP is used. .B bg .I jobspec returns 0 unless run when job control is disabled or, when run with @@ -6572,6 +6573,10 @@ of the directory stack. Without options, each .I jobspec is removed from the table of active jobs. +If +.I jobspec +is not present, and neither \fB\-a\fB nor \fB\-r\fP is supplied, +the shell's notion of the \fIcurrent job\fP is used. If the \fB\-h\fP option is given, each .I jobspec is not removed from the table, but is marked so that @@ -7587,12 +7592,14 @@ or .B until keyword, part of the test in an -.I if +.B if statement, part of a .B && or .B \(bv\(bv -list, or if the command's return value is +list, +any command in a pipeline but the last, +or if the command's return value is being inverted via .BR ! . A trap on \fBERR\fP, if set, is executed before the shell exits. diff --git a/doc/bashref.texi b/doc/bashref.texi index 2460df768..f0b39afa3 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -3967,10 +3967,11 @@ immediately, rather than before printing the next primary prompt. @item -e Exit immediately if a simple command (@pxref{Simple Commands}) exits with a non-zero status, unless the command that fails is part of the -command list immediately following a @code{while} or @code{until} -keyword, part of the test in an @code{if} statement, -part of a @code{&&} or @code{||} list, or if the command's return -status is being inverted using @code{!}. +command list immediately following a @code{while} or @code{until} keyword, +part of the test in an @code{if} statement, +part of a @code{&&} or @code{||} list, +any command in a pipeline but the last, +or if the command's return status is being inverted using @code{!}. A trap on @code{ERR}, if set, is executed before the shell exits. @item -f diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c index d05523e6a..d24a6c9aa 100644 --- a/lib/sh/snprintf.c +++ b/lib/sh/snprintf.c @@ -7,7 +7,7 @@ Unix snprintf implementation. derived from inetutils/libinetutils/snprintf.c Version 1.1 - Copyright (C) 2001 Free Software Foundation, Inc. + Copyright (C) 2001,2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General License as published by @@ -673,9 +673,8 @@ number(p, d, base) p->flags &= ~PF_ZEROPAD; sd = d; /* signed for ' ' padding in base 10 */ - flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; - if (*p->pf == 'x' || *p->pf == 'X') - flags |= FL_UNSIGNED; /* %x, %X treated as unsigned */ + flags = 0; + flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; if (*p->pf == 'X') flags |= FL_HEXUPPER; @@ -745,7 +744,7 @@ lnumber(p, d, base) p->flags &= ~PF_ZEROPAD; sd = d; /* signed for ' ' padding in base 10 */ - flags = (*p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; + flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0; if (*p->pf == 'X') flags |= FL_HEXUPPER; diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index 72ec06a2c..3efcf32d6 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/bash/bash-current +BUILD_DIR=/usr/local/build/chet/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR -- 2.47.2