diff options
author | ache <ache@FreeBSD.org> | 1996-10-31 07:15:57 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-10-31 07:15:57 +0000 |
commit | 3bd90e16be42e3493ed6bbbe42ba08bc9c8a2005 (patch) | |
tree | 28816431288caf07c120e0f79927503d2a566ece /bin | |
parent | a374bb8bb6e04b332f6ab06ec3bec6ab4ad91288 (diff) | |
download | FreeBSD-src-3bd90e16be42e3493ed6bbbe42ba08bc9c8a2005.zip FreeBSD-src-3bd90e16be42e3493ed6bbbe42ba08bc9c8a2005.tar.gz |
1) define STATIC as static and not empty
2) replace collate_range_cmp call with its code
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/expand.c | 22 | ||||
-rw-r--r-- | bin/sh/shell.h | 4 |
2 files changed, 22 insertions, 4 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index ff34da7..659da14 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: expand.c,v 1.10 1996/09/10 02:42:30 peter Exp $ */ #ifndef lint @@ -48,7 +48,7 @@ static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #include <unistd.h> #include <pwd.h> #include <stdlib.h> -#include <locale.h> +#include <limits.h> /* * Routines to expand arguments to commands. We have to deal with @@ -108,6 +108,24 @@ STATIC struct strlist *expsort __P((struct strlist *)); STATIC struct strlist *msort __P((struct strlist *, int)); STATIC int pmatch __P((char *, char *)); STATIC char *cvtnum __P((int, char *)); +STATIC int collate_range_cmp __P((int, int)); + +STATIC int collate_range_cmp (c1, c2) + int c1, c2; +{ + static char s1[2], s2[2]; + int ret; + + c1 &= UCHAR_MAX; + c2 &= UCHAR_MAX; + if (c1 == c2) + return (0); + s1[0] = c1; + s2[0] = c2; + if ((ret = strcoll(s1, s2)) != 0) + return (ret); + return (c1 - c2); +} /* * Expand shell variables and backquotes inside a here document. diff --git a/bin/sh/shell.h b/bin/sh/shell.h index ff2f9e7..043952d 100644 --- a/bin/sh/shell.h +++ b/bin/sh/shell.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)shell.h 8.2 (Berkeley) 5/4/95 - * $Id: shell.h,v 1.4 1996/09/01 10:21:41 peter Exp $ + * $Id: shell.h,v 1.5 1996/09/01 10:27:44 peter Exp $ */ /* @@ -70,7 +70,7 @@ typedef char *pointer; #define NULL 0 #endif #endif /* not __STDC__ */ -#define STATIC /* empty */ +#define STATIC static #define MKINIT /* empty */ #include <sys/cdefs.h> |