Bash-4.4 distribution sources and documentation
This commit is contained in:
parent
30a978b7d8
commit
a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/* mbscmp - multibyte string comparison. */
|
||||
|
||||
/* Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995-2015 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
|
|
@ -32,17 +32,18 @@ mbscmp (mbs1, mbs2)
|
|||
const char *mbs1;
|
||||
const char *mbs2;
|
||||
{
|
||||
int len1, len2;
|
||||
int len1, len2, mb_cur_max;
|
||||
wchar_t c1, c2;
|
||||
|
||||
len1 = len2 = 0;
|
||||
/* Reset multibyte characters to their initial state. */
|
||||
(void) mblen ((char *) NULL, 0);
|
||||
|
||||
mb_cur_max = MB_CUR_MAX;
|
||||
do
|
||||
{
|
||||
len1 = mbtowc (&c1, mbs1, MB_CUR_MAX);
|
||||
len2 = mbtowc (&c2, mbs2, MB_CUR_MAX);
|
||||
len1 = mbtowc (&c1, mbs1, mb_cur_max);
|
||||
len2 = mbtowc (&c2, mbs2, mb_cur_max);
|
||||
|
||||
if (len1 == 0)
|
||||
return len2 == 0 ? 0 : -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue