From: Bruno Haible Date: Wed, 12 Jan 2005 13:00:39 +0000 (+0000) Subject: Update 'mbswidth' module from gnulib. X-Git-Tag: v0.14.2~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9d6f710b8965a428649e2153ef191c965642747;p=thirdparty%2Fgettext.git Update 'mbswidth' module from gnulib. --- diff --git a/gettext-tools/lib/ChangeLog b/gettext-tools/lib/ChangeLog index 6fe5f3e70..1279c8e8d 100644 --- a/gettext-tools/lib/ChangeLog +++ b/gettext-tools/lib/ChangeLog @@ -92,6 +92,11 @@ * progname.h: Don't include stdbool.h. +2004-07-16 Bruno Haible + + * mbswidth.h: Add extern "C" for C++. + Reported by Albert Chin-A-Young . + 2003-09-08 Paul Eggert * atexit.c (atexit): Define using a prototype. diff --git a/gettext-tools/lib/mbswidth.c b/gettext-tools/lib/mbswidth.c index 6b9d4b38b..a51176026 100644 --- a/gettext-tools/lib/mbswidth.c +++ b/gettext-tools/lib/mbswidth.c @@ -91,7 +91,7 @@ int wcwidth (); character string pointed to by STRING. If a non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned. With flags = MBSW_REJECT_INVALID | MBSW_REJECT_UNPRINTABLE, this is - the multibyte analogon of the wcswidth function. */ + the multibyte analogue of the wcswidth function. */ int mbswidth (const char *string, int flags) { diff --git a/gettext-tools/lib/mbswidth.h b/gettext-tools/lib/mbswidth.h index 6fec3f490..4fcdb2096 100644 --- a/gettext-tools/lib/mbswidth.h +++ b/gettext-tools/lib/mbswidth.h @@ -30,6 +30,11 @@ #endif +#ifdef __cplusplus +extern "C" { +#endif + + /* Optional flags to influence mbswidth/mbsnwidth behavior. */ /* If this bit is set, return -1 upon finding an invalid or incomplete @@ -49,3 +54,8 @@ extern int mbswidth (const char *string, int flags); /* Returns the number of screen columns needed for the NBYTES bytes starting at BUF. */ extern int mbsnwidth (const char *buf, size_t nbytes, int flags); + + +#ifdef __cplusplus +} +#endif