diff libpurple/stringref.c @ 15822:32c366eeeb99

sed -ie 's/gaim/purple/g'
author Sean Egan <seanegan@gmail.com>
date Mon, 19 Mar 2007 07:01:17 +0000
parents 5fe8042783c1
children 44b4e8bd759b
line wrap: on
line diff
--- a/libpurple/stringref.c	Mon Mar 19 06:11:46 2007 +0000
+++ b/libpurple/stringref.c	Mon Mar 19 07:01:17 2007 +0000
@@ -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 @@
 
 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 @@
 	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 @@
 	return newref;
 }
 
-GaimStringref *gaim_stringref_ref(GaimStringref *stringref)
+PurpleStringref *purple_stringref_ref(PurpleStringref *stringref)
 {
 	if (stringref == NULL)
 		return NULL;
@@ -117,7 +117,7 @@
 	return stringref;
 }
 
-void gaim_stringref_unref(GaimStringref *stringref)
+void purple_stringref_unref(PurpleStringref *stringref)
 {
 	if (stringref == NULL)
 		return;
@@ -128,26 +128,26 @@
 	}
 }
 
-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 gboolean gs_idle_cb(gpointer data)
 {
-	GaimStringref *ref;
+	PurpleStringref *ref;
 	GList *del;
 
 	while (gclist != NULL) {