home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / blt1.000 / blt1 / blt-1.7-for-STk / blt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-11  |  2.8 KB  |  134 lines

  1. #include "stk.h"
  2.  
  3. #ifndef BLT_VERSION
  4. #define BLT_VERSION "1.7"
  5. #endif
  6.  
  7. /*
  8.  * The inclusion of contributed commands/widgets can be suppressed by
  9.  * defining the respective preprocessor symbol.
  10.  */
  11.  
  12. #ifndef NO_HTEXT
  13. EXTERN int Blt_HtextInit _ANSI_ARGS_((Tcl_Interp *interp));
  14. #endif
  15. #ifndef NO_GRAPH
  16. EXTERN int Blt_GraphInit _ANSI_ARGS_((Tcl_Interp *interp));
  17. #endif
  18. #ifndef NO_BARCHART
  19. EXTERN int Blt_BarchartInit _ANSI_ARGS_((Tcl_Interp *interp));
  20. #endif
  21. #ifndef NO_TABLE
  22. EXTERN int Blt_TableInit _ANSI_ARGS_((Tcl_Interp *interp));
  23. #endif
  24. #ifndef NO_BUSY
  25. EXTERN int Blt_BusyInit _ANSI_ARGS_((Tcl_Interp *interp));
  26. #endif
  27. #ifndef NO_WINDOW
  28. EXTERN int Blt_WindowInit _ANSI_ARGS_((Tcl_Interp *interp));
  29. #endif
  30. #ifndef NO_BITMAP
  31. EXTERN int Blt_BitmapInit _ANSI_ARGS_((Tcl_Interp *interp));
  32. #endif
  33. #ifndef NO_BGEXEC
  34. EXTERN int Blt_BgExecInit _ANSI_ARGS_((Tcl_Interp *interp));
  35. #endif
  36. #ifndef NO_DRAGDROP
  37. EXTERN int Blt_DragDropInit _ANSI_ARGS_((Tcl_Interp *interp));
  38. #endif
  39. #ifndef NO_DEBUG
  40. EXTERN int Blt_DebugInit _ANSI_ARGS_((Tcl_Interp *interp));
  41. #endif
  42. #ifndef NO_WATCH
  43. EXTERN int Blt_WatchInit _ANSI_ARGS_((Tcl_Interp *interp));
  44. #endif
  45. #ifndef NO_BELL
  46. EXTERN int Blt_BellInit _ANSI_ARGS_((Tcl_Interp *interp));
  47. #endif
  48. #ifndef NO_CUTBUFFER
  49. EXTERN int Blt_CutbufferInit _ANSI_ARGS_((Tcl_Interp *interp));
  50. #endif
  51.  
  52. int STk_Blt_Init(interp)
  53.     Tcl_Interp *interp;        /* Interpreter to add extra commands */
  54. {
  55.     char *libDir;
  56.  
  57.     if (! Tk_initialized) return TCL_ERROR;
  58.  
  59. #ifndef NO_HTEXT            
  60.     if (Blt_HtextInit(interp) != TCL_OK) {
  61.     return TCL_ERROR;
  62.     }
  63. #endif
  64. #ifndef NO_GRAPH    
  65.     if (Blt_GraphInit(interp) != TCL_OK) {
  66.     return TCL_ERROR;
  67.     }
  68. #endif
  69. #ifndef NO_BARCHART
  70.     if (Blt_BarchartInit(interp) != TCL_OK) {
  71.     return TCL_ERROR;
  72.     }
  73. #endif
  74. #ifndef NO_TABLE
  75.     if (Blt_TableInit(interp) != TCL_OK) {
  76.     return TCL_ERROR;
  77.     }
  78. #endif
  79. #ifndef NO_BUSY
  80.     if (Blt_BusyInit(interp) != TCL_OK) {
  81.     return TCL_ERROR;
  82.     }
  83. #endif
  84. #ifndef NO_WINDOW
  85.     if (Blt_WindowInit(interp) != TCL_OK) {
  86.     return TCL_ERROR;
  87.     }
  88. #endif
  89. #ifndef NO_DRAGDROP
  90.     if (Blt_DragDropInit(interp) != TCL_OK) {
  91.     return TCL_ERROR;
  92.     }
  93. #endif
  94. #ifndef NO_BELL
  95.     if (Blt_BellInit(interp) != TCL_OK) {
  96.     return TCL_ERROR;
  97.     }
  98. #endif
  99. #ifndef NO_CUTBUFFER
  100.     if (Blt_CutbufferInit(interp) != TCL_OK) {
  101.     return TCL_ERROR;
  102.     }
  103. #endif
  104. #ifndef NO_BITMAP
  105.     if (Blt_BitmapInit(interp) != TCL_OK) {
  106.     return TCL_ERROR;
  107.     }
  108. #endif
  109. #ifdef NO_BGEXEC
  110.     if (Blt_BgExecInit(interp) != TCL_OK) {
  111.     return TCL_ERROR;
  112.     }
  113. #endif
  114. #ifdef NO_DEBUG
  115.     if (Blt_DebugInit(interp) != TCL_OK) {
  116.     return TCL_ERROR;
  117.     }
  118. #endif
  119. #ifdef NO_WATCH
  120.     if (Blt_WatchInit(interp) != TCL_OK) {
  121.     return TCL_ERROR;
  122.     }
  123. #endif
  124.     Tcl_SetVar2(interp, "blt_versions", "BLT", BLT_VERSION, TCL_GLOBAL_ONLY);
  125.     return TCL_OK;
  126. }
  127.  
  128. void STk_init_blt(void)
  129. {
  130.   if (STk_Blt_Init(STk_main_interp) == TCL_ERROR)
  131.     err("Cannot initialize BLT package", NIL);
  132. }
  133.  
  134.