Updated doc/NEWS file
[midnight-commander.git] / lib / glibcompat.c
blobd80661e7e1380f94314e1befd4304960b4c7b0e6
1 /*
2 GLIB - Library of useful routines for C programming
4 Copyright (C) 2009, 2011
5 The Free Software Foundation, Inc.
7 Written by:
8 Slava Zanko <slavazanko@gmail.com>, 2009.
10 This file is part of the Midnight Commander.
12 The Midnight Commander is free software: you can redistribute it
13 and/or modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation, either version 3 of the License,
15 or (at your option) any later version.
17 The Midnight Commander is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
26 /** \file glibcompat.c
27 * \brief Source: compatibility with older versions of glib
29 * Following code was copied from glib to GNU Midnight Commander to
30 * provide compatibility with older versions of glib.
33 #include <config.h>
35 #include "global.h"
36 #include "glibcompat.h"
38 /*** global variables ****************************************************************************/
40 /*** file scope macro definitions ****************************************************************/
42 /*** file scope type declarations ****************************************************************/
44 /*** file scope variables ************************************************************************/
46 /*** file scope functions ************************************************************************/
48 /*** public functions ****************************************************************************/
49 /* --------------------------------------------------------------------------------------------- */
51 #if ! GLIB_CHECK_VERSION (2, 13, 0)
53 This is incomplete copy of same glib-function.
54 For older glib (less than 2.13) functional is enought.
55 For full version of glib welcome to glib update.
57 gboolean
58 g_unichar_iszerowidth (gunichar c)
60 if (G_UNLIKELY (c == 0x00AD))
61 return FALSE;
63 if (G_UNLIKELY ((c >= 0x1160 && c < 0x1200) || c == 0x200B))
64 return TRUE;
66 return FALSE;
68 #endif /* ! GLIB_CHECK_VERSION (2, 13, 0) */
70 /* --------------------------------------------------------------------------------------------- */