Bash-4.4 distribution sources and documentation

This commit is contained in:
Chet Ramey 2016-09-15 16:59:08 -04:00
commit a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions

View file

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