1) define STATIC as static and not empty

2) replace collate_range_cmp call with its code
This commit is contained in:
Andrey A. Chernov 1996-10-31 07:15:57 +00:00
parent 39bd0ffee6
commit 3cd859a7f1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19281
2 changed files with 22 additions and 4 deletions

View File

@ -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.

View File

@ -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>