plugins/tcl/tcl_win32.c

changeset 13434
84a853406b14
parent 12405
4575a63da9a6
equal deleted inserted replaced
13433:1baadf9fa403 13434:84a853406b14
2 * @file tcl_win32.c Gaim Tcl Windows Init 2 * @file tcl_win32.c Gaim Tcl Windows Init
3 * 3 *
4 * gaim 4 * gaim
5 * 5 *
6 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com> 6 * Copyright (C) 2003 Herman Bloggs <hermanator12002@yahoo.com>
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version. 11 * (at your option) any later version.
12 * 12 *
31 typedef void (CALLBACK* LPFNTKINIT)(Tcl_Interp*); 31 typedef void (CALLBACK* LPFNTKINIT)(Tcl_Interp*);
32 32
33 LPFNTCLCREATEINTERP wtcl_CreateInterp = NULL; 33 LPFNTCLCREATEINTERP wtcl_CreateInterp = NULL;
34 LPFNTKINIT wtk_Init = NULL; 34 LPFNTKINIT wtk_Init = NULL;
35 35
36 BOOL tcl_win32_init() { 36 static BOOL tcl_win32_init() {
37 if(!(wtcl_CreateInterp=(LPFNTCLCREATEINTERP)wgaim_find_and_loadproc("tcl84.dll", "Tcl_CreateInterp"))) { 37 if(!(wtcl_CreateInterp = (LPFNTCLCREATEINTERP) wgaim_find_and_loadproc("tcl84.dll", "Tcl_CreateInterp"))) {
38 gaim_debug(GAIM_DEBUG_INFO, "tcl", "tcl_win32_init error loading Tcl_CreateInterp\n"); 38 gaim_debug(GAIM_DEBUG_INFO, "tcl", "tcl_win32_init error loading Tcl_CreateInterp\n");
39 return FALSE; 39 return FALSE;
40 } 40 }
41 41
42 if(!(wtk_Init=(LPFNTKINIT)wgaim_find_and_loadproc("tk84.dll", "Tk_Init"))) { 42 if(!(wtk_Init = (LPFNTKINIT) wgaim_find_and_loadproc("tk84.dll", "Tk_Init"))) {
43 gaim_debug(GAIM_DEBUG_INFO, "tcl", "tcl_win32_init error loading Tk_Init\n"); 43 gaim_debug(GAIM_DEBUG_INFO, "tcl", "tcl_win32_init error loading Tk_Init\n");
44 return FALSE; 44 return FALSE;
45 } 45 }
46 return TRUE; 46 return TRUE;
47 } 47 }
48 48
49 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { 49 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
50 switch( fdwReason ) { 50 switch (fdwReason) {
51 case DLL_PROCESS_ATTACH: 51 case DLL_PROCESS_ATTACH:
52 return tcl_win32_init(); 52 return tcl_win32_init();
53 53
54 case DLL_THREAD_ATTACH: 54 case DLL_THREAD_ATTACH:
55 break; 55 case DLL_THREAD_DETACH:
56 56 case DLL_PROCESS_DETACH:
57 case DLL_THREAD_DETACH: 57 break;
58 break; 58 }
59 59 return TRUE;
60 case DLL_PROCESS_DETACH:
61 break;
62 }
63 return TRUE;
64 } 60 }
65 61
66

mercurial