This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Fwd: [1.7] Remove the overhead of calling function _jp2uc


It would be better to not do the same thing in two places:  should
string/local.h do a nested include to bring in ctype/local.h to
avoid maintenance issues?
				Craig

-----Original Message-----
From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
On Behalf Of IWAMURO Motonori
Sent: Friday, May 15, 2009 11:35 AM
To: newlib@sourceware.org
Subject: [PATCH] Fwd: [1.7] Remove the overhead of calling function
_jp2uc
...
> I propose to remove the overhead of calling function _jp2uc.
...
Index: newlib/libc/ctype/local.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/ctype/local.h,v
retrieving revision 1.3
diff -u -p -r1.3 local.h
--- newlib/libc/ctype/local.h	14 May 2009 20:16:21 -0000	1.3
+++ newlib/libc/ctype/local.h	15 May 2009 13:54:36 -0000
@@ -23,5 +23,10 @@
 extern char *__locale_charset ();

 /* internal function to translate JP to Unicode */
+#ifdef __CYGWIN__
+/* Under Cygwin, the incoming wide character is already given in UTF
due
+   to the requirements of the underlying OS. */
+#define _jp2uc(c) (c)
+#else
 wint_t _EXFUN (_jp2uc, (wint_t));
-
+#endif
Index: newlib/libc/string/local.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/string/local.h,v
retrieving revision 1.1
diff -u -p -r1.1 local.h
--- newlib/libc/string/local.h	15 May 2009 11:40:28 -0000	1.1
+++ newlib/libc/string/local.h	15 May 2009 13:54:37 -0000
@@ -1,7 +1,13 @@
 #include <_ansi.h>

 /* internal function to translate JP to Unicode */
+#ifdef __CYGWIN__
+/* Under Cygwin, the incoming wide character is already given in UTF
due
+   to the requirements of the underlying OS. */
+#define _jp2uc(c) (c)
+#else
 wint_t _EXFUN (_jp2uc, (wint_t));
+#endif

 /* internal function to compute width of wide char. */
 int _EXFUN (__wcwidth, (wint_t));
-- 
IWAMURO Motnori <http://vmi.jp/>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]