source: branches/blt4/lang/tcl/src/Rappture_Init.c @ 1897

Last change on this file since 1897 was 1897, checked in by gah, 11 years ago

re-merge with latest trunk changes

File size: 2.4 KB
Line 
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#include "config.h"
18
19#ifdef BUILD_rappture
20#undef TCL_STORAGE_CLASS
21#define TCL_STORAGE_CLASS DLLEXPORT
22#endif
23
24extern Tcl_AppInitProc Rappture_Init;
25extern Tcl_AppInitProc RpRlimit_Init;
26extern Tcl_AppInitProc RpRusage_Init;
27extern Tcl_AppInitProc RpSignal_Init;
28extern Tcl_AppInitProc RpSplit_Init;
29extern Tcl_AppInitProc RpSysinfo_Init;
30extern Tcl_AppInitProc RpDaemon_Init;
31
32#ifdef notdef
33extern Tcl_AppInitProc RpLibrary_Init;
34#endif
35extern Tcl_AppInitProc RpUnits_Init;
36extern Tcl_AppInitProc RpEncoding_Init;
37extern Tcl_AppInitProc RpUtils_Init;
38
39#ifdef BUILD_with_ffmpeg
40extern Tcl_AppInitProc RpMediaPlayer_Init;
41#endif
42
43#ifdef BUILD_Rappture
44__declspec( dllexport )
45#endif
46int
47Rappture_Init( Tcl_Interp * interp)
48{
49#ifdef _WIN32
50    rpWinInitJob();
51#endif
52    if (Tcl_InitStubs(interp, "8.4", 0) == NULL) {
53        return TCL_ERROR;
54    }
55    if (Tcl_PkgProvide(interp, "Rappture", PACKAGE_VERSION) != TCL_OK) {
56        return TCL_ERROR;
57    }
58#ifdef notdef
59    if (RpLibrary_Init(interp) != TCL_OK) {
60        return TCL_ERROR;
61    }
62#endif
63    if (RpUnits_Init(interp) != TCL_OK) {
64        return TCL_ERROR;
65    }
66    if (RpEncoding_Init(interp) != TCL_OK) {
67        return TCL_ERROR;
68    }
69    if (RpUtils_Init(interp) != TCL_OK) {
70        return TCL_ERROR;
71    }
72#ifdef BUILD_with_ffmpeg
73    if (RpMediaPlayer_Init(interp) != TCL_OK) {
74        return TCL_ERROR;
75    }
76#endif
77    if (RpRlimit_Init(interp) != TCL_OK) {
78        return TCL_ERROR;
79    }
80    if (RpRusage_Init(interp) != TCL_OK) {
81        return TCL_ERROR;
82    }
83    if (RpSignal_Init(interp) != TCL_OK) {
84        return TCL_ERROR;
85    }
86    if (RpSlice_Init(interp) != TCL_OK) {
87        return TCL_ERROR;
88    }
89    if (RpSysinfo_Init(interp) != TCL_OK) {
90        return TCL_ERROR;
91    }
92    if (RpDaemon_Init(interp) != TCL_OK) {
93        return TCL_ERROR;
94    }
95    return TCL_OK;
96}
97
Note: See TracBrowser for help on using the repository browser.