"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/mbsinit.c" between
le-1.16.5.tar.gz and le-1.16.6.tar.gz

About: le is a terminal text editor (many block operations with stream and rectangular blocks, tunable syntax highlighting, etc.).

mbsinit.c  (le-1.16.5):mbsinit.c  (le-1.16.6)
/* Test for initial conversion state. /* Test for initial conversion state.
Copyright (C) 2008-2017 Free Software Foundation, Inc. Copyright (C) 2008-2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008. Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h> #include <config.h>
/* Specification. */ /* Specification. */
#include <wchar.h> #include <wchar.h>
#include "verify.h" #include "verify.h"
#if GNULIB_defined_mbstate_t #if GNULIB_defined_mbstate_t
skipping to change at line 57 skipping to change at line 57
const char *pstate = (const char *)ps; const char *pstate = (const char *)ps;
return pstate == NULL || pstate[0] == 0; return pstate == NULL || pstate[0] == 0;
} }
#else #else
int int
mbsinit (const mbstate_t *ps) mbsinit (const mbstate_t *ps)
{ {
# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # if defined _WIN32 && !defined __CYGWIN__
/* Native Windows. */ /* Native Windows. */
# ifdef __MINGW32__ # ifdef __MINGW32__
/* On mingw, 'mbstate_t' is defined as 'int'. */ /* On mingw, 'mbstate_t' is defined as 'int'. */
return ps == NULL || *ps == 0; return ps == NULL || *ps == 0;
# else # else
/* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */
return ps == NULL || *(const unsigned int *)ps == 0; return ps == NULL || *(const unsigned int *)ps == 0;
# endif # endif
# else # else
/* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)