1 | /* |
---|
2 | * ---------------------------------------------------------------------- |
---|
3 | * Rappture_Init |
---|
4 | * |
---|
5 | * This file contains the function that initializes all of the various |
---|
6 | * extensions in this package. |
---|
7 | * ====================================================================== |
---|
8 | * AUTHOR: Derrick Kearney, Purdue University |
---|
9 | * Copyright (c) 2004-2006 Purdue Research Foundation |
---|
10 | * |
---|
11 | * See the file "license.terms" for information on usage and |
---|
12 | * redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
---|
13 | * ====================================================================== |
---|
14 | */ |
---|
15 | |
---|
16 | #include <tcl.h> |
---|
17 | |
---|
18 | #ifdef BUILD_rappture |
---|
19 | #undef TCL_STORAGE_CLASS |
---|
20 | #define TCL_STORAGE_CLASS DLLEXPORT |
---|
21 | #endif |
---|
22 | |
---|
23 | extern Tcl_AppInitProc Rappture_Init; |
---|
24 | extern Tcl_AppInitProc RpRlimit_Init; |
---|
25 | extern Tcl_AppInitProc RpRusage_Init; |
---|
26 | extern Tcl_AppInitProc RpSignal_Init; |
---|
27 | extern Tcl_AppInitProc RpSplit_Init; |
---|
28 | extern Tcl_AppInitProc RpSysinfo_Init; |
---|
29 | extern Tcl_AppInitProc RpDaemon_Init; |
---|
30 | |
---|
31 | #ifdef notdef |
---|
32 | extern Tcl_AppInitProc RpLibrary_Init; |
---|
33 | #endif |
---|
34 | extern Tcl_AppInitProc RpUnits_Init; |
---|
35 | extern Tcl_AppInitProc RpEncoding_Init; |
---|
36 | extern Tcl_AppInitProc RpUtils_Init; |
---|
37 | |
---|
38 | #ifdef BUILD_Rappture |
---|
39 | __declspec( dllexport ) |
---|
40 | #endif |
---|
41 | int |
---|
42 | Rappture_Init( Tcl_Interp * interp) |
---|
43 | { |
---|
44 | #ifdef _WIN32 |
---|
45 | rpWinInitJob(); |
---|
46 | #endif |
---|
47 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { |
---|
48 | return TCL_ERROR; |
---|
49 | } |
---|
50 | if (Tcl_PkgProvide(interp, "Rappture", PACKAGE_VERSION) != TCL_OK) { |
---|
51 | return TCL_ERROR; |
---|
52 | } |
---|
53 | #ifdef notdef |
---|
54 | if (RpLibrary_Init(interp) != TCL_OK) { |
---|
55 | return TCL_ERROR; |
---|
56 | } |
---|
57 | #endif |
---|
58 | if (RpUnits_Init(interp) != TCL_OK) { |
---|
59 | return TCL_ERROR; |
---|
60 | } |
---|
61 | if (RpEncoding_Init(interp) != TCL_OK) { |
---|
62 | return TCL_ERROR; |
---|
63 | } |
---|
64 | if (RpUtils_Init(interp) != TCL_OK) { |
---|
65 | return TCL_ERROR; |
---|
66 | } |
---|
67 | if (RpRlimit_Init(interp) != TCL_OK) { |
---|
68 | return TCL_ERROR; |
---|
69 | } |
---|
70 | if (RpRusage_Init(interp) != TCL_OK) { |
---|
71 | return TCL_ERROR; |
---|
72 | } |
---|
73 | if (RpSignal_Init(interp) != TCL_OK) { |
---|
74 | return TCL_ERROR; |
---|
75 | } |
---|
76 | if (RpSlice_Init(interp) != TCL_OK) { |
---|
77 | return TCL_ERROR; |
---|
78 | } |
---|
79 | if (RpSysinfo_Init(interp) != TCL_OK) { |
---|
80 | return TCL_ERROR; |
---|
81 | } |
---|
82 | if (RpDaemon_Init(interp) != TCL_OK) { |
---|
83 | return TCL_ERROR; |
---|
84 | } |
---|
85 | return TCL_OK; |
---|
86 | } |
---|
87 | |
---|