changeset 6425:26b739bc9f1a

[gaim-migrate @ 6933] Warnings and gaim_debugs committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Mon, 11 Aug 2003 18:54:38 +0000
parents 8e7f1662d802
children c0177faa0f72
files plugins/docklet/docklet-win32.c src/win32/libc_interface.c src/win32/untar.c src/win32/win32dep.c src/win32/wspell.c
diffstat 5 files changed, 25 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/docklet/docklet-win32.c	Mon Aug 11 18:43:04 2003 +0000
+++ b/plugins/docklet/docklet-win32.c	Mon Aug 11 18:54:38 2003 +0000
@@ -63,16 +63,16 @@
 
 	switch(msg) {
 	case WM_CREATE:
-		gaim_debug(GAIM_DEBUG_INFO, "wgaim_systray", "WM_CREATE\n");
+		gaim_debug(GAIM_DEBUG_INFO, "tray icon", "WM_CREATE\n");
 		taskbarRestartMsg = RegisterWindowMessage("TaskbarCreated");
 		break;
 		
 	case WM_TIMER:
-		gaim_debug(GAIM_DEBUG_INFO, "wgaim_systray", "WM_TIMER\n");
+		gaim_debug(GAIM_DEBUG_INFO, "tray icon", "WM_TIMER\n");
 		break;
 
 	case WM_DESTROY:
-		gaim_debug(GAIM_DEBUG_INFO, "wgaim_systray", "WM_DESTROY\n");
+		gaim_debug(GAIM_DEBUG_INFO, "tray icon", "WM_DESTROY\n");
 		break;
 
 	case WM_TRAYMESSAGE:
--- a/src/win32/libc_interface.c	Mon Aug 11 18:43:04 2003 +0000
+++ b/src/win32/libc_interface.c	Mon Aug 11 18:54:38 2003 +0000
@@ -30,12 +30,12 @@
 #include <sys/timeb.h>
 #include <sys/stat.h>
 #include <time.h>
+#include "debug.h"
 #include "libc_internal.h"
 
 /*
  *  PROTOS
  */
-extern void debug_printf(char * fmt, ...);
 
 /*
  *  LOCALS
@@ -57,7 +57,7 @@
 		if( error == WSAENOTSOCK )
 			return FALSE;
 		else {
-			debug_printf("wgaim_read: getsockopt returned error: %d\n", error);
+                        gaim_debug(GAIM_DEBUG_WARNING, "wgaim", "wgaim_is_socket: getsockopt returned error: %d\n", error);
 			return FALSE;
 		}
 	}
@@ -135,7 +135,7 @@
 		return 0;
 	}
 	default:
-		debug_printf("wgaim_fcntl: Unsupported command\n");
+                gaim_debug(GAIM_DEBUG_WARNING, "wgaim", "wgaim_fcntl: Unsupported command\n");
 		return -1;
 	}/*end switch*/
 }
@@ -329,7 +329,7 @@
 					   is not a sub dir of oldname, newname should be
 					   deleted and oldname should be renamed.
 					*/
-					debug_printf("Warning: wgaim_rename does not behave here as it should\n");
+					gaim_debug(GAIM_DEBUG_WARNING, "wgaim", "wgaim_rename does not behave here as it should\n");
 					return rename(oldname, newname);
 				}
 			}
--- a/src/win32/untar.c	Mon Aug 11 18:43:04 2003 +0000
+++ b/src/win32/untar.c	Mon Aug 11 18:54:38 2003 +0000
@@ -76,14 +76,14 @@
 #  include <unistd.h>
 # endif
 #endif
+#include "debug.h"
 #include "untar.h"
 
-extern void debug_printf(char * fmt, ...);
-
 #define mkdir(a,b) _mkdir((a))
-#define untar_error( error, args... ) debug_printf( "UNTAR ERROR: " ## error ## , ## args )
-#define untar_warning( warning, args... ) debug_printf( "UNTAR WARNING: " ## warning ## , ## args )
-
+#define untar_error( error, args... )      gaim_debug(GAIM_DEBUG_ERROR, "untar", ## error ## , ## args )
+#define untar_warning( warning, args... )  gaim_debug(GAIM_DEBUG_WARNING, "untar", ## warning ## , ## args )
+#define untar_verbose( args... )           gaim_debug(GAIM_DEBUG_INFO, "untar", ## args )
+ 
 #define WSIZE	32768	/* size of decompression buffer */
 #define TSIZE	512	/* size of a "tape" block */
 #define CR	13	/* carriage-return character */
@@ -492,17 +492,17 @@
 
 		/* list the file */
 		if (VERBOSE)
-			debug_printf("%c %s",
+			untar_verbose("%c %s",
 				ISREGULAR(*tblk) ? '-' : ("hlcbdp"[(tblk)->type - '1']),
 				nbuf);
 		else if (!QUIET)
-			debug_printf("%s\n", nbuf);
+			untar_verbose("%s\n", nbuf);
 
 		/* if link, then do the link-or-copy thing */
 		if (tblk->type == '1' || tblk->type == '2')
 		{
 			if (VERBOSE)
-				debug_printf(" -> %s\n", tblk->linkto);
+				untar_verbose(" -> %s\n", tblk->linkto);
 			if (!LISTING)
 				linkorcopy(tblk->linkto, nbuf, tblk->type == '2');
 			outsize = 0L;
@@ -527,7 +527,7 @@
 			else
 				n2 = " ignored";
 			if (VERBOSE)
-				debug_printf("%s\n", n2);
+				untar_verbose("%s\n", n2);
 			return 1;
 		}
 
@@ -535,7 +535,7 @@
 		if (!ISREGULAR(*tblk))
 		{
 			if (VERBOSE)
-				debug_printf(" ignored\n");
+				untar_verbose(" ignored\n");
 			outsize = 0L;
 			return 1;
 		}
@@ -543,7 +543,7 @@
 		/* print file statistics */
 		if (VERBOSE)
 		{
-			debug_printf(" (%ld byte%s, %ld tape block%s)\n",
+			untar_verbose(" (%ld byte%s, %ld tape block%s)\n",
 				outsize,
 				outsize == 1 ? "" : "s",
 				(outsize + TSIZE - 1) / TSIZE,
--- a/src/win32/win32dep.c	Mon Aug 11 18:43:04 2003 +0000
+++ b/src/win32/win32dep.c	Mon Aug 11 18:54:38 2003 +0000
@@ -23,6 +23,7 @@
  *
  */
 #include <windows.h>
+#include <io.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <winuser.h>
@@ -72,7 +73,6 @@
 /*
  *  PROTOS
  */
-
 BOOL (*MyFlashWindowEx)(PFLASHWINFO pfwi)=NULL;
 FARPROC wgaim_find_and_loadproc(char*, char*);
 extern void wgaim_gtkspell_init();
@@ -356,7 +356,7 @@
         LCID lcid;
 
         /* Check if user set LANG env var */
-        if((locale = g_getenv("LANG"))) {
+        if((locale = (char*)g_getenv("LANG"))) {
                 gaim_debug(GAIM_DEBUG_INFO, "wgaim", "Using locale set by the LANG env var.\n");
                 goto finish;
         }
@@ -367,7 +367,7 @@
 					 0,  KEY_QUERY_VALUE, &hkey)) {
                 BYTE data[10];
                 DWORD ds = 10;
-                if(ERROR_SUCCESS == RegQueryValueEx(hkey, "Installer Language", 0, NULL, &data, &ds)) {
+                if(ERROR_SUCCESS == RegQueryValueEx(hkey, "Installer Language", 0, NULL, (LPBYTE)&data, &ds)) {
 			gaim_debug(GAIM_DEBUG_INFO, "wgaim", "Using locale set by the installer\n");
                         if((locale = wgaim_lcid_to_posix(atoi(data))))
                                 goto finish;
--- a/src/win32/wspell.c	Mon Aug 11 18:43:04 2003 +0000
+++ b/src/win32/wspell.c	Mon Aug 11 18:54:38 2003 +0000
@@ -28,10 +28,9 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <gtkspell/gtkspell.h>
+#include "debug.h"
 #include "win32dep.h"
 
-extern void debug_printf(char * fmt, ...);
-
 /* GTKSPELL DUMMY FUNCS */
 GtkSpell* wgtkspell_new_attach(GtkTextView *view,
 			       const gchar *lang, 
@@ -83,11 +82,11 @@
 			    int mark = strlen(buffer);
 			    strcat(buffer, "\\aspell-15.dll");
 			    if(_access( buffer, 0 ) < 0)
-				    debug_printf("Couldn't find aspell-15.dll\n");
+				    gaim_debug(GAIM_DEBUG_WARNING, "wspell", "Couldn't find aspell-15.dll\n");
 			    else {
 				    char* tmp=NULL;
 				    buffer[mark] = '\0';
-				    debug_printf("Found Aspell in %s\n", buffer);
+				    gaim_debug(GAIM_DEBUG_INFO, "wspell", "Found Aspell in %s\n", buffer);
 				    /* Add path to Aspell dlls to PATH */
 				    tmp = g_malloc0(strlen(getenv("PATH")) + strlen(buffer) + 7);
 				    sprintf(tmp, "PATH=%s;%s", getenv("PATH"), buffer);
@@ -97,7 +96,7 @@
 			    }
 		    }
 		    else {
-			    debug_printf("Couldn't find path for Aspell\n");
+			    gaim_debug(GAIM_DEBUG_WARNING, "wspell", "Couldn't find path for Aspell\n");
 		    }
 		    RegCloseKey(hKey);
 	    }