Author: stefanbidi
Date: Wed Dec 10 04:49:42 2014
New Revision: 38246
URL: http://svn.gna.org/viewcvs/gnustep?rev=38246&view=rev
Log:
* Headers/CoreFoundation/GSCharUtilities.h: Fixed function case.
* Source/CFString.c: Use new whitespace function.
Modified:
libs/corebase/trunk/ChangeLog
libs/corebase/trunk/Headers/CoreFoundation/GSCharacter.h
libs/corebase/trunk/Source/CFString.c
Modified: libs/corebase/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/corebase/trunk/ChangeLog?rev=38246&r1=38245&r2=38246&view=diff
==============================================================================
--- libs/corebase/trunk/ChangeLog (original)
+++ libs/corebase/trunk/ChangeLog Wed Dec 10 04:49:42 2014
@@ -1,4 +1,8 @@
-2014-11-17 Stefan Bidigaray <[email protected]>
+2014-12-09 Stefan Bidigaray <[email protected]>
+ * Headers/CoreFoundation/GSCharUtilities.h: Fixed function case.
+ * Source/CFString.c: Use new whitespace function.
+
+2014-12-09 Stefan Bidigaray <[email protected]>
* Headers/CoreFoundation/GSCharUtilities.h: Added whitespace function,
implemented UTF-8 get function, and renamed UTF-8 trailing bytes
count function.
Modified: libs/corebase/trunk/Headers/CoreFoundation/GSCharacter.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/corebase/trunk/Headers/CoreFoundation/GSCharacter.h?rev=38246&r1=38245&r2=38246&view=diff
==============================================================================
--- libs/corebase/trunk/Headers/CoreFoundation/GSCharacter.h (original)
+++ libs/corebase/trunk/Headers/CoreFoundation/GSCharacter.h Wed Dec 10
04:49:42 2014
@@ -50,7 +50,7 @@
\return True if character is whitespace.
*/
CF_INLINE Boolean
-GSCharacterIsWhiteSpace (const UTF32Char c)
+GSCharacterIsWhitespace (const UTF32Char c)
{
return (0x0009 <= c && c <= 0x000D) || (c == 0x0020) || (c == 0x0085)
|| (c == 0x00A0) || (c == 0x1680) || (0x2000 <= c && c <= 0x200A)
Modified: libs/corebase/trunk/Source/CFString.c
URL:
http://svn.gna.org/viewcvs/gnustep/libs/corebase/trunk/Source/CFString.c?rev=38246&r1=38245&r2=38246&view=diff
==============================================================================
--- libs/corebase/trunk/Source/CFString.c (original)
+++ libs/corebase/trunk/Source/CFString.c Wed Dec 10 04:49:42 2014
@@ -33,6 +33,7 @@
#include "CoreFoundation/CFNumberFormatter.h"
#include "CoreFoundation/CFString.h"
#include "CoreFoundation/CFStringEncodingExt.h"
+#include "CoreFoundation/GSCharacter.h"
#include "GSPrivate.h"
#include "GSObjCRuntime.h"
@@ -51,9 +52,6 @@
#include <stdio.h>
#include <string.h>
-#if HAVE_UNICODE_UCHAR_H
-#include <unicode/uchar.h>
-#endif
#if HAVE_UNICODE_UNORM_H
#include <unicode/unorm.h>
#endif
@@ -1649,12 +1647,6 @@
kCFCompareBackwards | kCFCompareAnchored);
}
-#if HAVE_UNICODE_UCHAR_H
-#define _isWhiteSpace(c) u_isUWhiteSpace((UChar32)c)
-#else
-#define _isWhiteSpace(c) ((c) < 0x20)
-#endif
-
void
CFStringTrimWhitespace (CFMutableStringRef str)
{
@@ -1677,7 +1669,7 @@
idx = 0;
c = CFStringGetCharacterFromInlineBuffer (&buffer, idx++);
- while (_isWhiteSpace ((UChar32) c) && idx < textLength)
+ while (GSCharacterIsWhitespace (c) && idx < textLength)
c = CFStringGetCharacterFromInlineBuffer (&buffer, idx++);
start = idx - 1;
end = start;
@@ -1685,7 +1677,7 @@
{
c = CFStringGetCharacterFromInlineBuffer (&buffer, idx++);
/* reset the end point */
- if (!_isWhiteSpace ((UChar32) c))
+ if (!GSCharacterIsWhitespace (c))
end = idx;
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs