bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Allow mbswidth() in C++ programs


From: Albert Chin
Subject: [Bug-gnulib] Allow mbswidth() in C++ programs
Date: Tue, 29 Jun 2004 12:34:22 -0500
User-agent: Mutt/1.5.6i

Allow use of functions in lib/mbswidth.h in C++ programs (lftp uses
it).

BTW, shouldn't every replacement function in lib have the extern "C"
wrapper?

-- 
albert chin (address@hidden)

-- snip snip
2004-06-29  Albert Chin-A-Young  <address@hidden>

        * lib/mbswidth.h: Allow use of mbswidth() and mbsnwidth()
        in C++ programs.

Index: lib/mbswidth.h
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/mbswidth.h,v
retrieving revision 1.11
diff -u -3 -p -r1.11 mbswidth.h
--- lib/mbswidth.h      18 Mar 2004 13:36:53 -0000      1.11
+++ lib/mbswidth.h      29 Jun 2004 17:31:57 -0000
@@ -42,6 +42,10 @@
 #define MBSW_REJECT_UNPRINTABLE        2
 
 
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 /* Returns the number of screen columns needed for STRING.  */
 #define mbswidth gnu_mbswidth  /* avoid clash with UnixWare 7.1.1 function */
 extern int mbswidth (const char *string, int flags);
@@ -49,3 +53,7 @@ extern int mbswidth (const char *string,
 /* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]