bash-5.0-alpha release

This commit is contained in:
Chet Ramey
2018-05-22 16:51:07 -04:00
parent 7de27456f6
commit 9a51695bed
480 changed files with 69105 additions and 52542 deletions
+5
View File
@@ -37,6 +37,7 @@ extern size_t mbstrlen __P((const char *));
extern char *xstrchr __P((const char *, int));
extern int locale_mb_cur_max; /* XXX */
extern int locale_utf8locale; /* XXX */
#ifndef MB_INVALIDCH
#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
@@ -109,6 +110,8 @@ extern int locale_mb_cur_max; /* XXX */
_f = is_basic ((_str)[_i]); \
if (_f) \
mblength = 1; \
else if (locale_utf8locale && (((_str)[_i] & 0x80) == 0)) \
mblength = 1; \
else \
{ \
state_bak = state; \
@@ -267,6 +270,8 @@ extern int locale_mb_cur_max; /* XXX */
_k = is_basic (*(_src)); \
if (_k) \
mblength = 1; \
else if (locale_utf8locale && ((*(_src) & 0x80) == 0)) \
mblength = 1; \
else \
{ \
state_bak = state; \
+10
View File
@@ -36,6 +36,16 @@
# endif
#endif
/* New definition to use, moving away from __P since it's part of a reserved
namespace */
#if !defined (PARAMS)
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
# define PARAMS(protos) protos
# else
# define PARAMS(protos) ()
# endif
#endif
/* Fortify, at least, has trouble with this definition */
#if defined (HAVE_STRINGIZE)
# define CPP_STRING(x) #x
+13 -4
View File
@@ -35,14 +35,23 @@
# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
#endif
#ifndef TYPE_SIGNED_MAGNITUDE
# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
#endif
#ifndef TYPE_WIDTH
# define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
#endif
#ifndef TYPE_MINIMUM
# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
: (t) 0))
# define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
#endif
#ifndef TYPE_MAXIMUM
# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
# define TYPE_MAXIMUM(t) \
((t) (! TYPE_SIGNED (t) \
? (t) -1 \
: ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
#endif
#ifdef HAVE_LONG_LONG