commit bash-20050324 snapshot

This commit is contained in:
Chet Ramey
2011-12-03 13:45:10 -05:00
parent 3ee6b87dbc
commit a82a04b3a4
43 changed files with 26609 additions and 7716 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
/* glob.c -- file-name wildcard pattern matching for Bash.
Copyright (C) 1985-2002 Free Software Foundation, Inc.
Copyright (C) 1985-2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -133,13 +133,13 @@ glob_pattern_p (pattern)
int r;
if (MB_CUR_MAX == 1)
return (internal_glob_pattern_p (pattern));
return (internal_glob_pattern_p ((unsigned char *)pattern));
/* Convert strings to wide chars, and call the multibyte version. */
n = xdupmbstowcs (&wpattern, NULL, pattern);
if (n == (size_t)-1)
/* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */
return (internal_glob_pattern_p (pattern));
return (internal_glob_pattern_p ((unsigned char *)pattern));
r = internal_glob_wpattern_p (wpattern);
free (wpattern);
+1 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -358,7 +358,7 @@ BRACKMATCH (p, test, flags)
{
bcopy (p + 1, ccname, (close - p - 1) * sizeof (CHAR));
*(ccname + (close - p - 1)) = L('\0');
pc = IS_CCLASS (test, ccname);
pc = IS_CCLASS (test, (XCHAR *)ccname);
}
if (pc == -1)
pc = 0;
+6 -4
View File
@@ -1,7 +1,7 @@
/* strmatch.c -- ksh-like extended pattern matching for the shell and filename
globbing. */
/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -93,14 +93,16 @@ collequiv (c1, c2)
static int
collsym (s, len)
char *s;
CHAR *s;
int len;
{
register struct _collsym *csp;
char *x;
x = (char *)s;
for (csp = posix_collsyms; csp->name; csp++)
{
if (STREQN(csp->name, s, len) && csp->name[len] == '\0')
if (STREQN(csp->name, x, len) && csp->name[len] == '\0')
return (csp->code);
}
if (len == 1)
@@ -366,7 +368,7 @@ xstrmatch (pattern, string, flags)
wchar_t *wpattern, *wstring;
if (MB_CUR_MAX == 1)
return (internal_strmatch (pattern, string, flags));
return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
n = xdupmbstowcs (&wpattern, NULL, pattern);
if (n == (size_t)-1 || n == (size_t)-2)