Differences From Artifact [9b8845772e]:
- File
kitdll/buildsrc/kitdll-0.0/kitInit.c
— part of check-in
[8fde0c7fbf]
at
2010-09-30 05:35:48
on branch trunk
— Fixed test driver to call initialization routine -- changed to tclsh.
Updated to support determing encoding from environment
Removed debugging printfs/puts (user: rkeene, size: 2237) [annotate] [blame] [check-ins using]
To Artifact [891f640ccd]:
- File
kitdll/buildsrc/kitdll-0.0/kitInit.c
— part of check-in
[d903137347]
at
2010-09-30 08:20:13
on branch trunk
— Updated to support Registry and DDE packages on Win32, and to support the
Thread package
Added support for exporting all symbols to the DLL on Win32 (user: rkeene, size: 2635) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #endif Tcl_AppInitProc Vfs_Init, Rechan_Init; Tcl_AppInitProc Vfs_kitdll_data_tcl_Init; #ifdef KIT_INCLUDES_PWB Tcl_AppInitProc Pwb_Init; #endif static char *preInitCmd = "proc tclKitInit {} {\n" "rename tclKitInit {}\n" "load {} tclkit::init\n" "load {} rechan\n" "load {} vfs\n" "load {} vfs_kitdll_data_tcl\n" #include "vfs_kitdll.tcl.h" "vfs::kitdll::Mount tcl /.KITDLL_TCL\n" "set f [open \"/.KITDLL_TCL/boot.tcl\"]\n" "set s [read $f]\n" "close $f\n" "::tclkit::init::initInterp\n" "rename ::tclkit::init::initInterp {}\n" "uplevel #0 $s\n" "}\n" "tclKitInit"; static int tclkit_init_initinterp(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { #ifdef _WIN32 Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY); #else | > > > > > > > > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #endif Tcl_AppInitProc Vfs_Init, Rechan_Init; Tcl_AppInitProc Vfs_kitdll_data_tcl_Init; #ifdef KIT_INCLUDES_PWB Tcl_AppInitProc Pwb_Init; #endif #ifdef TCL_THREADS Tcl_AppInitProc Thread_Init; #endif #ifdef _WIN32 Tcl_AppInitProc Dde_Init, Registry_Init; #endif static char *preInitCmd = "proc tclKitInit {} {\n" "rename tclKitInit {}\n" "load {} tclkit::init\n" "load {} rechan\n" "load {} vfs\n" "load {} vfs_kitdll_data_tcl\n" #include "vfs_kitdll.tcl.h" "vfs::kitdll::Mount tcl /.KITDLL_TCL\n" "set f [open \"/.KITDLL_TCL/boot.tcl\"]\n" "set s [read $f]\n" "close $f\n" "::tclkit::init::initInterp\n" "rename ::tclkit::init::initInterp {}\n" "uplevel #0 $s\n" #ifdef _WIN32 "catch {load {} dde}\n" "catch {load {} registry}\n" #endif /* _WIN32 */ "}\n" "tclKitInit"; static int tclkit_init_initinterp(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { #ifdef _WIN32 Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY); #else |
︙ | ︙ | |||
66 67 68 69 70 71 72 | void __attribute__((constructor)) _Tclkit_Init(void) { Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL); Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL); Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL); Tcl_StaticPackage(0, "vfs_kitdll_data_tcl", Vfs_kitdll_data_tcl_Init, NULL); #ifdef KIT_INCLUDES_PWB | | | > > > > > > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | void __attribute__((constructor)) _Tclkit_Init(void) { Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL); Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL); Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL); Tcl_StaticPackage(0, "vfs_kitdll_data_tcl", Vfs_kitdll_data_tcl_Init, NULL); #ifdef KIT_INCLUDES_PWB Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL); #endif #ifdef TCL_THREADS Tcl_StaticPackage(0, "Thread", Thread_Init, NULL); #endif #ifdef _WIN32 Tcl_StaticPackage(0, "dde", Dde_Init, NULL); Tcl_StaticPackage(0, "registry", Registry_Init, NULL); #endif TclSetPreInitScript(preInitCmd); return; } |