Mercurial > pidgin
comparison src/win32/wspell.c @ 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 | 9657e243d001 |
children | da36acb8442c |
comparison
equal
deleted
inserted
replaced
6424:8e7f1662d802 | 6425:26b739bc9f1a |
---|---|
26 #include <string.h> | 26 #include <string.h> |
27 #include <stdlib.h> | 27 #include <stdlib.h> |
28 #include <glib.h> | 28 #include <glib.h> |
29 #include <gtk/gtk.h> | 29 #include <gtk/gtk.h> |
30 #include <gtkspell/gtkspell.h> | 30 #include <gtkspell/gtkspell.h> |
31 #include "debug.h" | |
31 #include "win32dep.h" | 32 #include "win32dep.h" |
32 | |
33 extern void debug_printf(char * fmt, ...); | |
34 | 33 |
35 /* GTKSPELL DUMMY FUNCS */ | 34 /* GTKSPELL DUMMY FUNCS */ |
36 GtkSpell* wgtkspell_new_attach(GtkTextView *view, | 35 GtkSpell* wgtkspell_new_attach(GtkTextView *view, |
37 const gchar *lang, | 36 const gchar *lang, |
38 GError **error) {return NULL;} | 37 GError **error) {return NULL;} |
81 if(ERROR_SUCCESS == RegQueryValueEx(hKey, "Path", NULL, &type, (LPBYTE)buffer, &size) || | 80 if(ERROR_SUCCESS == RegQueryValueEx(hKey, "Path", NULL, &type, (LPBYTE)buffer, &size) || |
82 ERROR_SUCCESS == RegQueryValueEx(hKey, "", NULL, &type, (LPBYTE)buffer, &size)) { | 81 ERROR_SUCCESS == RegQueryValueEx(hKey, "", NULL, &type, (LPBYTE)buffer, &size)) { |
83 int mark = strlen(buffer); | 82 int mark = strlen(buffer); |
84 strcat(buffer, "\\aspell-15.dll"); | 83 strcat(buffer, "\\aspell-15.dll"); |
85 if(_access( buffer, 0 ) < 0) | 84 if(_access( buffer, 0 ) < 0) |
86 debug_printf("Couldn't find aspell-15.dll\n"); | 85 gaim_debug(GAIM_DEBUG_WARNING, "wspell", "Couldn't find aspell-15.dll\n"); |
87 else { | 86 else { |
88 char* tmp=NULL; | 87 char* tmp=NULL; |
89 buffer[mark] = '\0'; | 88 buffer[mark] = '\0'; |
90 debug_printf("Found Aspell in %s\n", buffer); | 89 gaim_debug(GAIM_DEBUG_INFO, "wspell", "Found Aspell in %s\n", buffer); |
91 /* Add path to Aspell dlls to PATH */ | 90 /* Add path to Aspell dlls to PATH */ |
92 tmp = g_malloc0(strlen(getenv("PATH")) + strlen(buffer) + 7); | 91 tmp = g_malloc0(strlen(getenv("PATH")) + strlen(buffer) + 7); |
93 sprintf(tmp, "PATH=%s;%s", getenv("PATH"), buffer); | 92 sprintf(tmp, "PATH=%s;%s", getenv("PATH"), buffer); |
94 putenv(tmp); | 93 putenv(tmp); |
95 g_free(tmp); | 94 g_free(tmp); |
96 load_gtkspell(); | 95 load_gtkspell(); |
97 } | 96 } |
98 } | 97 } |
99 else { | 98 else { |
100 debug_printf("Couldn't find path for Aspell\n"); | 99 gaim_debug(GAIM_DEBUG_WARNING, "wspell", "Couldn't find path for Aspell\n"); |
101 } | 100 } |
102 RegCloseKey(hKey); | 101 RegCloseKey(hKey); |
103 } | 102 } |
104 } | 103 } |