[1018] | 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 |
---|
[3177] | 9 | * Copyright (c) 2004-2012 HUBzero Foundation, LLC |
---|
[1018] | 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> |
---|
[1873] | 17 | #include "config.h" |
---|
[1018] | 18 | |
---|
| 19 | #ifdef BUILD_rappture |
---|
| 20 | #undef TCL_STORAGE_CLASS |
---|
| 21 | #define TCL_STORAGE_CLASS DLLEXPORT |
---|
| 22 | #endif |
---|
| 23 | |
---|
| 24 | extern Tcl_AppInitProc Rappture_Init; |
---|
| 25 | extern Tcl_AppInitProc RpRlimit_Init; |
---|
| 26 | extern Tcl_AppInitProc RpRusage_Init; |
---|
| 27 | extern Tcl_AppInitProc RpSignal_Init; |
---|
[3404] | 28 | extern Tcl_AppInitProc RpSlice_Init; |
---|
[1257] | 29 | extern Tcl_AppInitProc RpSysinfo_Init; |
---|
[1018] | 30 | extern Tcl_AppInitProc RpDaemon_Init; |
---|
[2651] | 31 | extern Tcl_AppInitProc RpCurses_Init; |
---|
[1018] | 32 | |
---|
| 33 | #ifdef notdef |
---|
| 34 | extern Tcl_AppInitProc RpLibrary_Init; |
---|
| 35 | #endif |
---|
| 36 | extern Tcl_AppInitProc RpUnits_Init; |
---|
| 37 | extern Tcl_AppInitProc RpEncoding_Init; |
---|
| 38 | extern Tcl_AppInitProc RpUtils_Init; |
---|
| 39 | |
---|
| 40 | #ifdef BUILD_Rappture |
---|
| 41 | __declspec( dllexport ) |
---|
| 42 | #endif |
---|
| 43 | int |
---|
| 44 | Rappture_Init( Tcl_Interp * interp) |
---|
| 45 | { |
---|
| 46 | #ifdef _WIN32 |
---|
| 47 | rpWinInitJob(); |
---|
| 48 | #endif |
---|
| 49 | if (Tcl_InitStubs(interp, "8.4", 0) == NULL) { |
---|
| 50 | return TCL_ERROR; |
---|
| 51 | } |
---|
[3730] | 52 | if (Tcl_PkgProvide(interp, "Rappture", RAPPTURE_VERSION) != TCL_OK) { |
---|
[1018] | 53 | return TCL_ERROR; |
---|
| 54 | } |
---|
| 55 | #ifdef notdef |
---|
| 56 | if (RpLibrary_Init(interp) != TCL_OK) { |
---|
| 57 | return TCL_ERROR; |
---|
| 58 | } |
---|
| 59 | #endif |
---|
| 60 | if (RpUnits_Init(interp) != TCL_OK) { |
---|
| 61 | return TCL_ERROR; |
---|
| 62 | } |
---|
| 63 | if (RpEncoding_Init(interp) != TCL_OK) { |
---|
| 64 | return TCL_ERROR; |
---|
| 65 | } |
---|
| 66 | if (RpUtils_Init(interp) != TCL_OK) { |
---|
| 67 | return TCL_ERROR; |
---|
| 68 | } |
---|
| 69 | if (RpRlimit_Init(interp) != TCL_OK) { |
---|
| 70 | return TCL_ERROR; |
---|
| 71 | } |
---|
| 72 | if (RpRusage_Init(interp) != TCL_OK) { |
---|
| 73 | return TCL_ERROR; |
---|
| 74 | } |
---|
| 75 | if (RpSignal_Init(interp) != TCL_OK) { |
---|
| 76 | return TCL_ERROR; |
---|
| 77 | } |
---|
[1578] | 78 | if (RpSlice_Init(interp) != TCL_OK) { |
---|
[1576] | 79 | return TCL_ERROR; |
---|
| 80 | } |
---|
[1257] | 81 | if (RpSysinfo_Init(interp) != TCL_OK) { |
---|
| 82 | return TCL_ERROR; |
---|
| 83 | } |
---|
[1018] | 84 | if (RpDaemon_Init(interp) != TCL_OK) { |
---|
| 85 | return TCL_ERROR; |
---|
| 86 | } |
---|
[2651] | 87 | if (RpCurses_Init(interp) != TCL_OK) { |
---|
| 88 | return TCL_ERROR; |
---|
| 89 | } |
---|
[1018] | 90 | return TCL_OK; |
---|
| 91 | } |
---|
| 92 | |
---|