[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdecore/config
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2008-04-21 16:44:15
Message-ID: 1208796255.994195.12326.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 799481 by chehrlic:

when you want to use your own isspace() instead the one from ctype.h you should make \
sure to not conflict with existing macros

 M  +3 -3      bufferfragment_p.h  


--- trunk/KDE/kdelibs/kdecore/config/bufferfragment_p.h #799480:799481
@@ -21,7 +21,7 @@
 #ifndef BUFFERFRAGMENT_H
 #define BUFFERFRAGMENT_H
 
-#define isspace(str) ((str == ' ') || (str == '\t') || (str == '\r'))
+#define bf_isspace(str) ((str == ' ') || (str == '\t') || (str == '\r'))
 
 // This class provides wrapper around fragment of existing buffer (array of bytes). 
 // If underlying buffer gets deleted, all BufferFragment objects referencing it \
become invalid. @@ -74,11 +74,11 @@
 
     void trim() 
     {
-        while (isspace(*d) && len > 0) {
+        while (bf_isspace(*d) && len > 0) {
             d++;
             len--;
         }
-        while (len > 0 && isspace(d[len - 1])) 
+        while (len > 0 && bf_isspace(d[len - 1])) 
             len--;
     }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic