mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-24 14:27:57 +02:00
commit bash-20050804 snapshot
This commit is contained in:
@@ -223,6 +223,12 @@ qqq. Fixed a bug that caused core dumps when the shell was reading its non-
|
||||
interactive input from fd 0 and fd 0 was duplicated and restored using a
|
||||
combination of `exec' (to save) and redirection (to restore).
|
||||
|
||||
rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
|
||||
up properly when a `return' is executed.
|
||||
|
||||
sss. Change internal command substitution completion function to append a slash
|
||||
to directory names in the command.
|
||||
|
||||
2. Changes to Readline
|
||||
|
||||
a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
|
||||
@@ -284,6 +290,9 @@ r. Lots of changes so readline builds and runs on MinGW.
|
||||
s. Readline no longer tries to modify the terminal settings when running in
|
||||
callback mode.
|
||||
|
||||
t. The Readline display code no longer sets the location of the last invisible
|
||||
character in the prompt if the \[\] sequence is empty.
|
||||
|
||||
3. New Features in Bash
|
||||
|
||||
a. Bash now understands LC_TIME as a special variable so that time display
|
||||
|
||||
@@ -11800,3 +11800,53 @@ bashline.c
|
||||
any character to a unique completion, instead of a space, unless
|
||||
the last word in the quoted command substitution completes to a
|
||||
directory name. In that case we append the expected slash
|
||||
|
||||
8/1
|
||||
---
|
||||
builtins/printf.def
|
||||
- make sure variables are initialized if their values are tested later
|
||||
|
||||
[bash-3.1-alpha1 updated and re-frozen]
|
||||
|
||||
8/2
|
||||
---
|
||||
variables.c
|
||||
- make sure to call stifle_history with an `int' instead of an intmax_t.
|
||||
Sometimes it makes a difference
|
||||
|
||||
8/3
|
||||
---
|
||||
[bash-3.1-alpha1 released]
|
||||
|
||||
support/mksignames.c
|
||||
- add `SIGSTKFLT' (RHE3)
|
||||
- add `SIGXRES' (Solaris 9)
|
||||
|
||||
8/4
|
||||
---
|
||||
builtins/ulimit.def
|
||||
- fix typo to make `x' the right option for locks
|
||||
- add new options to short help synopsis
|
||||
|
||||
variables.c
|
||||
- use get_variable_value instead of direct reference to value_cell
|
||||
in make_variable_value when appending to the current value, so
|
||||
references to array variables without subscripts will be equivalent
|
||||
to element 0
|
||||
|
||||
lib/readline/text.c
|
||||
- rewrote rl_change_case to correctly change the case of multibyte
|
||||
characters where appropriate
|
||||
|
||||
8/5
|
||||
---
|
||||
configure.in
|
||||
- remove call to obsolete macro AC_ACVERSION
|
||||
- remove special calls to AC_CYGWIN and AC_MINGW32; AC_CANONICAL_HOST
|
||||
takes care of those cases
|
||||
|
||||
general.h
|
||||
- include `chartypes.h' for definition of ISALPHA
|
||||
- fix definitions of ABSPATH and RELPATH for cygwin
|
||||
- fix definition of ISDIRSEP for cygwin to allow backslash as a
|
||||
directory name separator
|
||||
|
||||
+40
-3
@@ -11797,6 +11797,43 @@ builtins/evalstring.c
|
||||
|
||||
bashline.c
|
||||
- change command_subst_completion_function to suppress appending
|
||||
any character to a unique completion, instead of a space, which
|
||||
can be misleading when the last word in the quoted command
|
||||
substitution completes to a directory name
|
||||
any character to a unique completion, instead of a space, unless
|
||||
the last word in the quoted command substitution completes to a
|
||||
directory name. In that case we append the expected slash
|
||||
|
||||
8/1
|
||||
---
|
||||
builtins/printf.def
|
||||
- make sure variables are initialized if their values are tested later
|
||||
|
||||
[bash-3.1-alpha1 updated and re-frozen]
|
||||
|
||||
8/2
|
||||
---
|
||||
variables.c
|
||||
- make sure to call stifle_history with an `int' instead of an intmax_t.
|
||||
Sometimes it makes a difference
|
||||
|
||||
8/3
|
||||
---
|
||||
[bash-3.1-alpha1 released]
|
||||
|
||||
support/mksignames.c
|
||||
- add `SIGSTKFLT' (RHE3)
|
||||
- add `SIGXRES' (Solaris 9)
|
||||
|
||||
8/4
|
||||
---
|
||||
builtins/ulimit.def
|
||||
- fix typo to make `x' the right option for locks
|
||||
- add new options to short help synopsis
|
||||
|
||||
variables.c
|
||||
- use get_variable_value instead of direct reference to value_cell
|
||||
in make_variable_value when appending to the current value, so
|
||||
references to array variables without subscripts will be equivalent
|
||||
to element 0
|
||||
|
||||
lib/readline/text.c
|
||||
- rewrote rl_change_case to correctly change the case of multibyte
|
||||
characters where appropriate
|
||||
|
||||
+1
-14
@@ -1,5 +1,5 @@
|
||||
@%:@! /bin/sh
|
||||
@%:@ From configure.in for Bash 3.1, version 3.178, from autoconf version AC_ACVERSION.
|
||||
@%:@ From configure.in for Bash 3.1, version 3.179.
|
||||
@%:@ Guess values for system-dependent variables and create Makefiles.
|
||||
@%:@ Generated by GNU Autoconf 2.59 for bash 3.1-alpha1.
|
||||
@%:@
|
||||
@@ -3733,19 +3733,6 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case $host_os in
|
||||
*cygwin* ) CYGWIN=yes;;
|
||||
* ) CYGWIN=no;;
|
||||
esac
|
||||
|
||||
|
||||
case $host_os in
|
||||
*mingw32* ) MINGW32=yes;;
|
||||
* ) MINGW32=no;;
|
||||
esac
|
||||
|
||||
|
||||
# Check whether --enable-largefile or --disable-largefile was given.
|
||||
if test "${enable_largefile+set}" = set; then
|
||||
enableval="$enable_largefile"
|
||||
|
||||
+87
-87
@@ -15,101 +15,101 @@
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_CHECK_FUNCS' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'include' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
}
|
||||
], 'Autom4te::Request' )
|
||||
);
|
||||
|
||||
+884
-900
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -375,7 +375,7 @@ printf_builtin (list)
|
||||
int rlen, r;
|
||||
|
||||
p = getstr ();
|
||||
ch = rlen = 0;
|
||||
ch = rlen = r = 0;
|
||||
xp = bexpand (p, strlen (p), &ch, &rlen);
|
||||
|
||||
if (xp)
|
||||
@@ -402,6 +402,7 @@ printf_builtin (list)
|
||||
char *p, *xp;
|
||||
int r;
|
||||
|
||||
r = 0;
|
||||
p = getstr ();
|
||||
if (ansic_shouldquote (p))
|
||||
xp = ansic_quote (p, 0, (int *)0);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
This file is ulimit.def, from which is created ulimit.c.
|
||||
It implements the builtin "ulimit" in Bash.
|
||||
|
||||
Copyright (C) 1987-2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2005 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -24,7 +24,7 @@ $PRODUCES ulimit.c
|
||||
$BUILTIN ulimit
|
||||
$FUNCTION ulimit_builtin
|
||||
$DEPENDS_ON !_MINIX
|
||||
$SHORT_DOC ulimit [-SHacdflmnpstuv] [limit]
|
||||
$SHORT_DOC ulimit [-SHacdfilmnpqstuvx] [limit]
|
||||
Ulimit provides control over the resources available to processes
|
||||
started by the shell, on systems that allow such control. If an
|
||||
option is given, it is interpreted as follows:
|
||||
@@ -231,7 +231,7 @@ static RESOURCE_LIMITS limits[] = {
|
||||
{ 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" },
|
||||
#endif
|
||||
#ifdef RLIMIT_LOCKS
|
||||
{ 'w', RLIMIT_LOCKS, 1, "file locks", (char *)NULL },
|
||||
{ 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL },
|
||||
#endif
|
||||
{ -1, -1, -1, (char *)NULL, (char *)NULL }
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# From configure.in for Bash 3.1, version 3.178, from autoconf version AC_ACVERSION.
|
||||
# From configure.in for Bash 3.1, version 3.179.
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.59 for bash 3.1-alpha1.
|
||||
#
|
||||
@@ -3733,19 +3733,6 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case $host_os in
|
||||
*cygwin* ) CYGWIN=yes;;
|
||||
* ) CYGWIN=no;;
|
||||
esac
|
||||
|
||||
|
||||
case $host_os in
|
||||
*mingw32* ) MINGW32=yes;;
|
||||
* ) MINGW32=no;;
|
||||
esac
|
||||
|
||||
|
||||
# Check whether --enable-largefile or --disable-largefile was given.
|
||||
if test "${enable_largefile+set}" = set; then
|
||||
enableval="$enable_largefile"
|
||||
|
||||
+1
-5
@@ -22,7 +22,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
AC_REVISION([for Bash 3.1, version 3.178, from autoconf version] AC_ACVERSION)dnl
|
||||
AC_REVISION([for Bash 3.1, version 3.179])dnl
|
||||
|
||||
define(bashvers, 3.1)
|
||||
define(relstatus, alpha1)
|
||||
@@ -363,10 +363,6 @@ dnl test for Unix variants
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
|
||||
dnl test for non-Unix variants
|
||||
AC_CYGWIN
|
||||
AC_MINGW32
|
||||
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
dnl BEGIN changes for cross-building (currently cygwin, minGW, and
|
||||
|
||||
+7
-2
@@ -22,10 +22,10 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
AC_REVISION([for Bash 3.1, version 3.177, from autoconf version] AC_ACVERSION)dnl
|
||||
AC_REVISION([for Bash 3.1, version 3.178, from autoconf version] AC_ACVERSION)dnl
|
||||
|
||||
define(bashvers, 3.1)
|
||||
define(relstatus, devel)
|
||||
define(relstatus, alpha1)
|
||||
|
||||
AC_INIT(bash, bashvers-relstatus, bug-bash@gnu.org)
|
||||
|
||||
@@ -502,6 +502,11 @@ if test $opt_readline = yes; then
|
||||
esac
|
||||
READLINE_DEP=
|
||||
READLINE_LIB=-lreadline
|
||||
# section for OS versions that don't allow unresolved symbols
|
||||
# to be compiled into dynamic libraries.
|
||||
case "$host_os" in
|
||||
cygwin*) TILDE_LIB= ;;
|
||||
esac
|
||||
else
|
||||
RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
|
||||
READLINE_DEP='$(READLINE_LIBRARY)'
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "stdc.h"
|
||||
|
||||
#include "bashtypes.h"
|
||||
#include "chartypes.h"
|
||||
|
||||
#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
|
||||
# if defined (HAVE_SYS_TIME_H)
|
||||
@@ -249,14 +250,18 @@ typedef int QSFUNC ();
|
||||
# define ABSPATH(x) ((x)[0] == '/')
|
||||
# define RELPATH(x) ((x)[0] != '/')
|
||||
#else /* __CYGWIN__ */
|
||||
# define ABSPATH(x) (((x)[0] && ISALPHA((unsigned char)(x)[0]) && (x)[1] == ':' && (x)[2] == '/') || (x)[0] == '/')
|
||||
# define RELPATH(x) (!(x)[0] || ((x)[1] != ':' && (x)[0] != '/'))
|
||||
# define ABSPATH(x) (((x)[0] && ISALPHA((unsigned char)(x)[0]) && (x)[1] == ':') || ISDIRSEP((x)[0]))
|
||||
# define RELPATH(x) (ABSPATH(x) == 0)
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
#define ROOTEDPATH(x) (ABSPATH(x))
|
||||
|
||||
#define DIRSEP '/'
|
||||
#define ISDIRSEP(c) ((c) == '/')
|
||||
#if !defined (__CYGWIN__)
|
||||
# define ISDIRSEP(c) ((c) == '/')
|
||||
#else
|
||||
# define ISDIRSEP(c) ((c) == '/' || (c) == '\\')
|
||||
#endif /* __CYGWIN__ */
|
||||
#define PATHSEP(c) (ISDIRSEP(c) || (c) == 0)
|
||||
|
||||
#if 0
|
||||
|
||||
+5
-4
@@ -129,16 +129,16 @@ typedef struct {
|
||||
: (type)(list))
|
||||
|
||||
#if __GNUC__ > 1
|
||||
# define FASTCOPY(s, d, n) __builtin_memcpy (d, s, n)
|
||||
# define FASTCOPY(s, d, n) __builtin_memcpy ((d), (s), (n))
|
||||
#else /* !__GNUC__ */
|
||||
# if !defined (HAVE_BCOPY)
|
||||
# if !defined (HAVE_MEMMOVE)
|
||||
# define FASTCOPY(s, d, n) memcpy (d, s, n)
|
||||
# define FASTCOPY(s, d, n) memcpy ((d), (s), (n))
|
||||
# else
|
||||
# define FASTCOPY(s, d, n) memmove (d, s, n)
|
||||
# define FASTCOPY(s, d, n) memmove ((d), (s), (n))
|
||||
# endif /* !HAVE_MEMMOVE */
|
||||
# else /* HAVE_BCOPY */
|
||||
# define FASTCOPY(s, d, n) bcopy (s, d, n)
|
||||
# define FASTCOPY(s, d, n) bcopy ((s), (d), (n))
|
||||
# endif /* HAVE_BCOPY */
|
||||
#endif /* !__GNUC__ */
|
||||
|
||||
@@ -216,6 +216,7 @@ typedef void sh_resetsig_func_t __P((int)); /* sh_vintfunc_t */
|
||||
typedef int sh_ignore_func_t __P((const char *)); /* sh_icpfunc_t */
|
||||
|
||||
typedef int sh_assign_func_t __P((const char *)); /* sh_icpfunc_t */
|
||||
typedef int sh_wassign_func_t __P((WORD_DESC *));
|
||||
|
||||
typedef int sh_builtin_func_t __P((WORD_LIST *)); /* sh_wlist_func_t */
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
# include <readline/history.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
|
||||
@@ -32,6 +32,12 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#if defined (READLINE_LIBRARY)
|
||||
# include "posixstat.h"
|
||||
# include "readline.h"
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#ifndef errno
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,12 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit();
|
||||
#endif
|
||||
|
||||
#ifdef READLINE_LIBRARY
|
||||
# include "readline.h"
|
||||
# include "history.h"
|
||||
|
||||
+60
-21
@@ -1234,42 +1234,81 @@ static int
|
||||
rl_change_case (count, op)
|
||||
int count, op;
|
||||
{
|
||||
register int start, end;
|
||||
int inword, c;
|
||||
int start, next, end;
|
||||
int inword, c, nc, nop;
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
wchar_t wc, nwc;
|
||||
char mb[MB_LEN_MAX+1];
|
||||
int mblen, p;
|
||||
mbstate_t ps;
|
||||
#endif
|
||||
|
||||
start = rl_point;
|
||||
rl_forward_word (count, 0);
|
||||
end = rl_point;
|
||||
|
||||
if (op != UpCase && op != DownCase && op != CapCase)
|
||||
{
|
||||
rl_ding ();
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (count < 0)
|
||||
SWAP (start, end);
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
#endif
|
||||
|
||||
/* We are going to modify some text, so let's prepare to undo it. */
|
||||
rl_modifying (start, end);
|
||||
|
||||
for (inword = 0; start < end; start++)
|
||||
inword = 0;
|
||||
while (start < end)
|
||||
{
|
||||
c = rl_line_buffer[start];
|
||||
switch (op)
|
||||
c = _rl_char_value (rl_line_buffer, start);
|
||||
/* This assumes that the upper and lower case versions are the same width. */
|
||||
next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO);
|
||||
|
||||
if (_rl_walphabetic (c) == 0)
|
||||
{
|
||||
case UpCase:
|
||||
rl_line_buffer[start] = _rl_to_upper (c);
|
||||
break;
|
||||
|
||||
case DownCase:
|
||||
rl_line_buffer[start] = _rl_to_lower (c);
|
||||
break;
|
||||
|
||||
case CapCase:
|
||||
rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c);
|
||||
inword = rl_alphabetic (rl_line_buffer[start]);
|
||||
break;
|
||||
|
||||
default:
|
||||
rl_ding ();
|
||||
return -1;
|
||||
inword = 0;
|
||||
start = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (op == CapCase)
|
||||
{
|
||||
nop = inword ? DownCase : UpCase;
|
||||
inword = 1;
|
||||
}
|
||||
else
|
||||
nop = op;
|
||||
if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c))
|
||||
{
|
||||
nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c);
|
||||
rl_line_buffer[start] = nc;
|
||||
}
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
else
|
||||
{
|
||||
mbrtowc (&wc, rl_line_buffer + start, end - start, &ps);
|
||||
nwc = (nop == UpCase) ? (iswlower (wc) ? towupper (wc) : wc)
|
||||
: (iswupper (wc) ? towlower (wc) : wc);
|
||||
if (nwc != wc) /* just skip unchanged characters */
|
||||
{
|
||||
mblen = wcrtomb (mb, nwc, &ps);
|
||||
if (mblen > 0)
|
||||
mb[mblen] = '\0';
|
||||
/* Assume the same width */
|
||||
strncpy (rl_line_buffer + start, mb, mblen);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
start = next;
|
||||
}
|
||||
|
||||
rl_point = end;
|
||||
return 0;
|
||||
}
|
||||
|
||||
+15
-1
@@ -133,11 +133,11 @@ initialize_signames ()
|
||||
}
|
||||
#endif /* SIGRTMIN && SIGRTMAX */
|
||||
|
||||
/* AIX */
|
||||
#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
|
||||
signal_names[SIGLOST] = "SIGLOST";
|
||||
#endif
|
||||
|
||||
/* AIX */
|
||||
#if defined (SIGMSG) /* HFT input data pending */
|
||||
signal_names[SIGMSG] = "SIGMSG";
|
||||
#endif
|
||||
@@ -203,6 +203,10 @@ initialize_signames ()
|
||||
signal_names[SIGCANCEL] = "SIGCANCEL";
|
||||
#endif
|
||||
|
||||
#if defined (SIGXRES) /* resource control exceeded */
|
||||
signal_names[SIGXRES] = "SIGXRES";
|
||||
#endif
|
||||
|
||||
/* HP-UX */
|
||||
#if defined (SIGDIL) /* DIL signal (?) */
|
||||
signal_names[SIGDIL] = "SIGDIL";
|
||||
@@ -226,6 +230,16 @@ initialize_signames ()
|
||||
signal_names[SIGWINDOW] = "SIGWINDOW";
|
||||
#endif
|
||||
|
||||
/* Linux */
|
||||
#if defined (SIGSTKFLT)
|
||||
signal_names[SIGSTKFLT] = "SIGSTKFLT";
|
||||
#endif
|
||||
|
||||
/* FreeBSD */
|
||||
#if defined (SIGTHR) /* thread interrupt */
|
||||
signal_names[SIGTHR] = "SIGTHR";
|
||||
#endif
|
||||
|
||||
/* Common */
|
||||
#if defined (SIGHUP) /* hangup */
|
||||
signal_names[SIGHUP] = "SIGHUP";
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ B
|
||||
ok 1
|
||||
ok 2
|
||||
aéb
|
||||
0000000 141 303 251 142
|
||||
0000000 141 303 251 142
|
||||
0000004
|
||||
|
||||
+3
-1
@@ -18,5 +18,7 @@ echo $?
|
||||
|
||||
wait
|
||||
|
||||
cat &
|
||||
# the sleep is intended to give the kill time to execute before the job
|
||||
# exits
|
||||
(sleep 1 ; cat ) &
|
||||
kill -1 %% && echo i killed it || echo could not kill it
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
echo warning: some of these tests will fail if you do not have UTF-8 >&2
|
||||
echo warning: locales installed on your system
|
||||
${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > /tmp/xx
|
||||
diff /tmp/xx nquote4.right && rm -f /tmp/xx
|
||||
|
||||
+4
-2
@@ -1819,7 +1819,7 @@ make_variable_value (var, value, flags)
|
||||
{
|
||||
if (flags & ASS_APPEND)
|
||||
{
|
||||
oval = value_cell (var);
|
||||
oval = get_variable_value (var);
|
||||
if (oval == 0) /* paranoia */
|
||||
oval = "";
|
||||
olen = STRLEN (oval);
|
||||
@@ -3937,6 +3937,7 @@ sv_histsize (name)
|
||||
{
|
||||
char *temp;
|
||||
intmax_t num;
|
||||
int hmax;
|
||||
|
||||
temp = get_string_value (name);
|
||||
|
||||
@@ -3946,7 +3947,8 @@ sv_histsize (name)
|
||||
{
|
||||
if (name[4] == 'S')
|
||||
{
|
||||
stifle_history (num);
|
||||
hmax = num;
|
||||
stifle_history (hmax);
|
||||
num = where_history ();
|
||||
if (history_lines_this_session > num)
|
||||
history_lines_this_session = num;
|
||||
|
||||
Reference in New Issue
Block a user