From: Colin Walters Date: Thu, 18 Feb 2010 15:09:20 +0000 (-0500) Subject: Revert "_dbus_string_to_lower(): new function" X-Git-Tag: dbus-1.3.1~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f81e8702a6c09e1394c28ac110fa602050c5f74a;p=platform%2Fupstream%2Fdbus.git Revert "_dbus_string_to_lower(): new function" This reverts commit 39aa8090241b2588eeb2df05880d71abaf8c526e. --- diff --git a/dbus/dbus-string.c b/dbus/dbus-string.c index 227f141..d9cf18e 100644 --- a/dbus/dbus-string.c +++ b/dbus/dbus-string.c @@ -26,8 +26,6 @@ #include "dbus-string.h" /* we allow a system header here, for speed/convenience */ #include -#include - /* for vsnprintf */ #include #define DBUS_CAN_USE_DBUS_STRING_PRIVATE 1 @@ -2751,41 +2749,6 @@ _dbus_string_validate_ascii (const DBusString *str, } /** - * converts the given range of the string to lower case - * - * @param str the string - * @param start first byte index to convert - * @param len number of bytes to convert - * @returns #TRUE if the byte range exists - */ -dbus_bool_t -_dbus_string_to_lower (const DBusString *str, - int start, - int len) -{ - unsigned char *s; - unsigned char *end; - DBUS_CONST_STRING_PREAMBLE (str); - _dbus_assert (start >= 0); - _dbus_assert (start <= real->len); - _dbus_assert (len >= 0); - - if (len > real->len - start) - return FALSE; - - s = real->str + start; - end = s + len; - while (s != end) - { - if (isupper(*s)) - *s = tolower(*s); - ++s; - } - - return TRUE; -} - -/** * Checks that the given range of the string is valid UTF-8. If the * given range is not entirely contained in the string, returns * #FALSE. If the string contains any nul bytes in the given range, diff --git a/dbus/dbus-string.h b/dbus/dbus-string.h index dbea333..7c30111 100644 --- a/dbus/dbus-string.h +++ b/dbus/dbus-string.h @@ -43,11 +43,7 @@ typedef struct DBusString DBusString; struct DBusString { -#ifdef _DEBUG - char *dummy1; /**< placeholder */ -#else const void *dummy1; /**< placeholder */ -#endif int dummy2; /**< placeholder */ int dummy3; /**< placeholder */ int dummy4; /**< placeholder */ @@ -288,9 +284,6 @@ dbus_bool_t _dbus_string_hex_decode (const DBusString *source, int *end_return, DBusString *dest, int insert_at); -dbus_bool_t _dbus_string_to_lower (const DBusString *str, - int start, - int len); dbus_bool_t _dbus_string_validate_ascii (const DBusString *str, int start, int len);