commit bash-20120413 snapshot

This commit is contained in:
Chet Ramey
2012-05-02 08:25:44 -04:00
parent ed3f3b6c22
commit 63817e33cd
7 changed files with 45 additions and 14 deletions
+16
View File
@@ -13702,3 +13702,19 @@ doc/{bash.1,bashref.texi}
any shell with history enabled, not just interactive shells. This
seems to be more logical behavior. Suggested by Greg Wooledge
<wooledg@eeg.ccf.org>
4/12
----
lib/readline/colors.h
- only include stdbool.h if HAVE_STDBOOL_H is defined
- if HAVE_STDBOOL_H is not defined, provide enough definition for the
library to use `bool', `true', and `false'
lib/readline/parse-colors.[ch]
- don't try to include <stdbool.h> at all; rely on colors.h to do it
lib/sh/snprintf.c
- vsnprintf_internal: only treat '0' as a flag to indicate zero padding
if `.' hasn't been encountered ((flags&PF_DOT) == 0); otherwise treat
it as the first digit of a precision specifier. Fixes bug reported
by Petr Sumbera <petr.sumbera@sun.com>
+17 -1
View File
@@ -28,7 +28,23 @@
#define _COLORS_H_
#include <stdio.h> // size_t
#include <stdbool.h> // bool
#if defined (HAVE_STDBOOL_H)
# include <stdbool.h> // bool
#else
typedef int _rl_bool_t;
#ifdef bool
# undef bool
#endif
#define bool _rl_bool_t
#ifndef true
# define true 1
# define false 0
#endif
#endif /* !HAVE_STDBOOL_H */
/* Null is a valid character in a color indicator (think about Epson
printers, for example) so we have to use a length/buffer string
+2 -6
View File
@@ -46,10 +46,6 @@
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
#if defined (HAVE_STDBOOL_H)
# include <stdbool.h> // bool
#endif
#include "rldefs.h" // STREQ, savestring
#include "readline.h"
#include "rlprivate.h"
@@ -104,8 +100,8 @@ struct bin_str _rl_color_indicator[] =
the first free byte after the array and the character that ended
the input string, respectively. */
static
bool get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count) {
static bool
get_funky_string (char **dest, const char **src, bool equals_end, size_t *output_count) {
char num; /* For numerical codes */
size_t count; /* Something to count with */
enum {
-1
View File
@@ -27,7 +27,6 @@
#ifndef _PARSE_COLORS_H_
#define _PARSE_COLORS_H_
#include <stdbool.h> // bool
#include "readline.h"
#define LEN_STR_PAIR(s) sizeof (s) - 1, s
+7 -4
View File
@@ -1288,10 +1288,6 @@ vsnprintf_internal(data, string, length, format, args)
case '#':
data->flags |= PF_ALTFORM;
continue;
case '0':
data->flags |= PF_ZEROPAD;
data->pad = '0';
continue;
case '*':
if (data->flags & PF_DOT)
data->flags |= PF_STAR_P;
@@ -1322,6 +1318,13 @@ vsnprintf_internal(data, string, length, format, args)
data->flags |= PF_THOUSANDS;
continue;
case '0':
if ((data->flags & PF_DOT) == 0)
{
data->flags |= PF_ZEROPAD;
data->pad = '0';
continue;
}
case '1': case '2': case '3':
case '4': case '5': case '6':
case '7': case '8': case '9':
+1 -1
View File
@@ -67,7 +67,7 @@ done
case "${host_os}-${SHOBJ_CC}-${host_vendor}" in
nsk-cc-tandem)
SHOBJ_CFLAGS=-Wglobalized
case $(uname -m) in
case `uname -m` in
NSR*)
SHOBJ_CFLAGS="${SHOBJ_CFLAGS} -Wcall_shared" # default on TNS/E, needed on TNS/R
SHOBJ_LD=/usr/bin/ld # for TNS/R
+2 -1
View File
@@ -787,7 +787,8 @@ _run_trap_internal (sig, tag)
{
char *trap_command, *old_trap;
int trap_exit_value, *token_state;
int save_return_catch_flag, function_code, flags;
volatile int save_return_catch_flag, function_code;
int flags;
procenv_t save_return_catch;
WORD_LIST *save_subst_varlist;
#if defined (ARRAY_VARS)