mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 04:43:32 +00:00
Replace collate_range_cmp call with its code
This commit is contained in:
parent
3cd859a7f1
commit
a082293830
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19282
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: glob.c,v 1.4 1996/08/12 02:08:43 ache Exp $
|
||||
* $Id: glob.c,v 1.5 1996/08/12 21:32:15 ache Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -39,8 +39,8 @@ static char sccsid[] = "@(#)glob.c 8.1 (Berkeley) 5/31/93";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <glob.h>
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@ -94,7 +94,24 @@ static int pmatch __P((Char *, Char *));
|
||||
static void pword __P((void));
|
||||
static void psave __P((int));
|
||||
static void backeval __P((Char *, bool));
|
||||
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);
|
||||
}
|
||||
|
||||
static Char *
|
||||
globtilde(nv, s)
|
||||
|
Loading…
Reference in New Issue
Block a user