diff libpurple/debug.c @ 15823: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 6dc5dc83a61b
line wrap: on
line diff
--- a/libpurple/debug.c	Mon Mar 19 06:11:46 2007 +0000
+++ b/libpurple/debug.c	Mon Mar 19 07:01:17 2007 +0000
@@ -2,9 +2,9 @@
  * @file debug.c Debug API
  * @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.
  *
@@ -27,31 +27,31 @@
 #include "prefs.h"
 #include "util.h"
 
-static GaimDebugUiOps *debug_ui_ops = NULL;
+static PurpleDebugUiOps *debug_ui_ops = NULL;
 
 /*
  * This determines whether debug info should be written to the
  * console or not.
  *
- * It doesn't make sense to make this a normal Gaim preference
+ * It doesn't make sense to make this a normal Purple preference
  * because it's a command line option.  This will always be FALSE,
- * unless the user explicitly started Gaim with the -d flag.
- * It doesn't matter what this value was the last time Gaim was
+ * unless the user explicitly started Purple with the -d flag.
+ * It doesn't matter what this value was the last time Purple was
  * started, so it doesn't make sense to save it in prefs.
  */
 static gboolean debug_enabled = FALSE;
 
 static void
-gaim_debug_vargs(GaimDebugLevel level, const char *category,
+purple_debug_vargs(PurpleDebugLevel level, const char *category,
 				 const char *format, va_list args)
 {
-	GaimDebugUiOps *ops;
+	PurpleDebugUiOps *ops;
 	char *arg_s = NULL;
 
-	g_return_if_fail(level != GAIM_DEBUG_ALL);
+	g_return_if_fail(level != PURPLE_DEBUG_ALL);
 	g_return_if_fail(format != NULL);
 
-	ops = gaim_debug_get_ui_ops();
+	ops = purple_debug_get_ui_ops();
 
 	if (!debug_enabled && ((ops == NULL) || (ops->print == NULL)))
 		return;
@@ -62,12 +62,12 @@
 		gchar *ts_s;
 
 		if ((category != NULL) &&
-			(gaim_prefs_exists("/core/debug/timestamps")) &&
-			(gaim_prefs_get_bool("/core/debug/timestamps"))) {
+			(purple_prefs_exists("/core/debug/timestamps")) &&
+			(purple_prefs_get_bool("/core/debug/timestamps"))) {
 			const char *mdate;
 
 			time_t mtime = time(NULL);
-			mdate = gaim_utf8_strftime("%H:%M:%S", localtime(&mtime));
+			mdate = purple_utf8_strftime("%H:%M:%S", localtime(&mtime));
 			ts_s = g_strdup_printf("(%s) ", mdate);
 		} else {
 			ts_s = g_strdup("");
@@ -88,111 +88,111 @@
 }
 
 void
-gaim_debug(GaimDebugLevel level, const char *category,
+purple_debug(PurpleDebugLevel level, const char *category,
 		   const char *format, ...)
 {
 	va_list args;
 
-	g_return_if_fail(level != GAIM_DEBUG_ALL);
+	g_return_if_fail(level != PURPLE_DEBUG_ALL);
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(level, category, format, args);
+	purple_debug_vargs(level, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_misc(const char *category, const char *format, ...)
+purple_debug_misc(const char *category, const char *format, ...)
 {
 	va_list args;
 
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(GAIM_DEBUG_MISC, category, format, args);
+	purple_debug_vargs(PURPLE_DEBUG_MISC, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_info(const char *category, const char *format, ...)
+purple_debug_info(const char *category, const char *format, ...)
 {
 	va_list args;
 
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(GAIM_DEBUG_INFO, category, format, args);
+	purple_debug_vargs(PURPLE_DEBUG_INFO, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_warning(const char *category, const char *format, ...)
+purple_debug_warning(const char *category, const char *format, ...)
 {
 	va_list args;
 
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(GAIM_DEBUG_WARNING, category, format, args);
+	purple_debug_vargs(PURPLE_DEBUG_WARNING, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_error(const char *category, const char *format, ...)
+purple_debug_error(const char *category, const char *format, ...)
 {
 	va_list args;
 
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(GAIM_DEBUG_ERROR, category, format, args);
+	purple_debug_vargs(PURPLE_DEBUG_ERROR, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_fatal(const char *category, const char *format, ...)
+purple_debug_fatal(const char *category, const char *format, ...)
 {
 	va_list args;
 
 	g_return_if_fail(format != NULL);
 
 	va_start(args, format);
-	gaim_debug_vargs(GAIM_DEBUG_FATAL, category, format, args);
+	purple_debug_vargs(PURPLE_DEBUG_FATAL, category, format, args);
 	va_end(args);
 }
 
 void
-gaim_debug_set_enabled(gboolean enabled)
+purple_debug_set_enabled(gboolean enabled)
 {
 	debug_enabled = enabled;
 }
 
 gboolean
-gaim_debug_is_enabled()
+purple_debug_is_enabled()
 {
 	return debug_enabled;
 }
 
 void
-gaim_debug_set_ui_ops(GaimDebugUiOps *ops)
+purple_debug_set_ui_ops(PurpleDebugUiOps *ops)
 {
 	debug_ui_ops = ops;
 }
 
-GaimDebugUiOps *
-gaim_debug_get_ui_ops(void)
+PurpleDebugUiOps *
+purple_debug_get_ui_ops(void)
 {
 	return debug_ui_ops;
 }
 
 void
-gaim_debug_init(void)
+purple_debug_init(void)
 {
-	gaim_prefs_add_none("/core/debug");
+	purple_prefs_add_none("/core/debug");
 
 	/*
 	 * This pref is currently used by both the console
 	 * output and the debug window output.
 	 */
-	gaim_prefs_add_bool("/core/debug/timestamps", FALSE);
+	purple_prefs_add_bool("/core/debug/timestamps", FALSE);
 }