diff options
author | Sean Egan <seanegan@pidgin.im> | 2007-03-19 07:01:17 +0000 |
---|---|---|
committer | Sean Egan <seanegan@pidgin.im> | 2007-03-19 07:01:17 +0000 |
commit | ceab2c4c55f659f3b65533bb0c7ba0e2d1293775 (patch) | |
tree | 058ad5acdb9dd18ca9747d56438f6e9ca2af4adb /libpurple/stringref.c | |
parent | 1c027a2e75a3291f35af4c111bdc7d9008daef07 (diff) | |
download | pidgin-ceab2c4c55f659f3b65533bb0c7ba0e2d1293775.tar.gz |
sed -ie 's/gaim/purple/g'
Diffstat (limited to 'libpurple/stringref.c')
-rw-r--r-- | libpurple/stringref.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libpurple/stringref.c b/libpurple/stringref.c index 9a1c408cac..537c6ad40d 100644 --- a/libpurple/stringref.c +++ b/libpurple/stringref.c @@ -2,9 +2,9 @@ * @file stringref.c Reference-counted immutable strings * @ingroup core * - * gaim + * purple * - * Gaim is the legal property of its developers, whose names are too numerous + * Purple is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * source distribution. * @@ -39,7 +39,7 @@ * it must be immutable -- for this reason, do _not_ access it * directly! */ -struct _GaimStringref { +struct _PurpleStringref { guint32 ref; /**< The reference count of this string. * Note that reference counts are only * 31 bits, and the high-order bit @@ -57,31 +57,31 @@ struct _GaimStringref { static GList *gclist = NULL; -static void stringref_free(GaimStringref *stringref); +static void stringref_free(PurpleStringref *stringref); static gboolean gs_idle_cb(gpointer data); -GaimStringref *gaim_stringref_new(const char *value) +PurpleStringref *purple_stringref_new(const char *value) { - GaimStringref *newref; + PurpleStringref *newref; if (value == NULL) return NULL; - newref = g_malloc(sizeof(GaimStringref) + strlen(value)); + newref = g_malloc(sizeof(PurpleStringref) + strlen(value)); strcpy(newref->value, value); newref->ref = 1; return newref; } -GaimStringref *gaim_stringref_new_noref(const char *value) +PurpleStringref *purple_stringref_new_noref(const char *value) { - GaimStringref *newref; + PurpleStringref *newref; if (value == NULL) return NULL; - newref = g_malloc(sizeof(GaimStringref) + strlen(value)); + newref = g_malloc(sizeof(PurpleStringref) + strlen(value)); strcpy(newref->value, value); newref->ref = 0x80000000; @@ -92,16 +92,16 @@ GaimStringref *gaim_stringref_new_noref(const char *value) return newref; } -GaimStringref *gaim_stringref_printf(const char *format, ...) +PurpleStringref *purple_stringref_printf(const char *format, ...) { - GaimStringref *newref; + PurpleStringref *newref; va_list ap; if (format == NULL) return NULL; va_start(ap, format); - newref = g_malloc(sizeof(GaimStringref) + g_printf_string_upper_bound(format, ap)); + newref = g_malloc(sizeof(PurpleStringref) + g_printf_string_upper_bound(format, ap)); vsprintf(newref->value, format, ap); va_end(ap); newref->ref = 1; @@ -109,7 +109,7 @@ GaimStringref *gaim_stringref_printf(const char *format, ...) return newref; } -GaimStringref *gaim_stringref_ref(GaimStringref *stringref) +PurpleStringref *purple_stringref_ref(PurpleStringref *stringref) { if (stringref == NULL) return NULL; @@ -117,7 +117,7 @@ GaimStringref *gaim_stringref_ref(GaimStringref *stringref) return stringref; } -void gaim_stringref_unref(GaimStringref *stringref) +void purple_stringref_unref(PurpleStringref *stringref) { if (stringref == NULL) return; @@ -128,26 +128,26 @@ void gaim_stringref_unref(GaimStringref *stringref) } } -const char *gaim_stringref_value(const GaimStringref *stringref) +const char *purple_stringref_value(const PurpleStringref *stringref) { return (stringref == NULL ? NULL : stringref->value); } -int gaim_stringref_cmp(const GaimStringref *s1, const GaimStringref *s2) +int purple_stringref_cmp(const PurpleStringref *s1, const PurpleStringref *s2) { - return (s1 == s2 ? 0 : strcmp(gaim_stringref_value(s1), gaim_stringref_value(s2))); + return (s1 == s2 ? 0 : strcmp(purple_stringref_value(s1), purple_stringref_value(s2))); } -size_t gaim_stringref_len(const GaimStringref *stringref) +size_t purple_stringref_len(const PurpleStringref *stringref) { - return strlen(gaim_stringref_value(stringref)); + return strlen(purple_stringref_value(stringref)); } -static void stringref_free(GaimStringref *stringref) +static void stringref_free(PurpleStringref *stringref) { #ifdef DEBUG if (REFCOUNT(stringref->ref) != 0) { - gaim_debug(GAIM_DEBUG_ERROR, "stringref", "Free of nonzero (%d) ref stringref!\n", REFCOUNT(stringref->ref)); + purple_debug(PURPLE_DEBUG_ERROR, "stringref", "Free of nonzero (%d) ref stringref!\n", REFCOUNT(stringref->ref)); return; } #endif /* DEBUG */ @@ -156,7 +156,7 @@ static void stringref_free(GaimStringref *stringref) static gboolean gs_idle_cb(gpointer data) { - GaimStringref *ref; + PurpleStringref *ref; GList *del; while (gclist != NULL) { |