From kde-commits Mon Apr 21 16:44:15 2008 From: Christian Ehrlicher Date: Mon, 21 Apr 2008 16:44:15 +0000 To: kde-commits Subject: KDE/kdelibs/kdecore/config Message-Id: <1208796255.994195.12326.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120879627324901 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--; }