home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / tcl / extend / man / Startup.3 < prev    next >
Encoding:
Text File  |  1993-10-26  |  4.9 KB  |  160 lines  |  [TEXT/MPS ]

  1. .\"
  2. .\" Startup.man
  3. .\"
  4. .\" Extended Tcl binary file search command.
  5. .\"----------------------------------------------------------------------------
  6. .\" Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
  7. .\"
  8. .\" Permission to use, copy, modify, and distribute this software and its
  9. .\" documentation for any purpose and without fee is hereby granted, provided
  10. .\" that the above copyright notice appear in all copies.  Karl Lehenbauer and
  11. .\" Mark Diekhans make no representations about the suitability of this
  12. .\" software for any purpose.  It is provided "as is" without express or
  13. .\" implied warranty.
  14. .\"----------------------------------------------------------------------------
  15. .\" $Id: Startup.3,v 2.7 1993/07/20 08:35:45 markd Exp $
  16. .\"----------------------------------------------------------------------------
  17. .\"
  18. .TH "Tcl_Startup" TCL "" "Tcl"
  19. .ad b
  20. .SH NAME
  21. Tcl_ShellEnvInit, Tcl_Startup, Tcl_ProcessInitFile - Extended Tcl Shell startup facilities.
  22. '
  23. .SH SYNOPSIS
  24. .nf
  25. .ft CW
  26. #include "tclExtend.h"
  27.  
  28. extern char *tclAppName;
  29. extern char *tclAppLongname;
  30. extern char *tclAppVersion;
  31.  
  32. int
  33. Tcl_ShellEnvInit (Tcl_Interp  *interp,
  34.                   unsigned     options);
  35.  
  36. void
  37. Tcl_Startup (Tcl_Interp  *interp,
  38.              unsigned     options);
  39.              int          argc,
  40.              const char **argv);
  41.  
  42. int
  43. Tcl_ProcessInitFile (Tcl_Interp *interp,
  44.                      char       *dirEnvVar,
  45.                      char       *dir,
  46.                      char       *version1,
  47.                      char       *version2,
  48.                      char       *initFile);
  49. .ft R
  50. .fi
  51. .SH DESCRIPTION
  52. These functions control the startup of the Extended Tcl shell and related
  53. applications.
  54. '
  55. .SS tclAppName
  56. The application name to be returned by the \fBinfox\fR
  57. command. This should be a short mnemonic.  If a special value is
  58. desired, it must be set before one of the startup procedures are called.
  59. '
  60. .SS tclAppLongname
  61. The application long name to be returned by the \fBinfox\fR command.
  62. This should be a natural language string.  If a special value is desired, it
  63. must be set before one of the startup procedures are called.
  64. '
  65. .SS tclAppVersion
  66. The application version string to be returned by the \fBinfox\fR command.  If
  67. a special value is desired, it must be set before one of the startup
  68. procedures are called.
  69. '
  70. .SS Tcl_ShellEnvInit
  71. .PP
  72. Initialize the Tcl shell environment.  Including evaluating the standard
  73. TclX init file and setting various variable and values for infox to access.
  74. If this is an interactive Tcl session, SIGINT is set to generate a Tcl
  75. error.  This routine is provided for the wishx shell or similar
  76. environments where the Tcl_Startup command line parsing is not desired.
  77. .PP
  78. Parameters:
  79. .RS 2
  80. \fBo \fIinterp\fR - A pointer to the interpreter.
  81. .br
  82. \fBo \fIoptions\fR - Flags to control the behavior of this routine, the
  83. following option is supported:
  84. .RE
  85. .br
  86. .RS 5
  87. .br
  88. \fB- TCLSH_INTERACTIVE\fR - Set interactiveSession to 1.
  89. .br
  90. \fB- TCLSH_QUICK_STARTUP\fR - Don't source the Tcl inititialization file.
  91. .br
  92. \fB- TCLSH_ABORT_STARTUP_ERR\fR - If set, abort the process if an error occurs.
  93. .br
  94. \fB- TCLSH_NO_STACK_DUMP\fR - If an error occurs, don't dump out the procedure
  95. call stack, just print an error message.
  96. .RE
  97. .PP
  98. Notes:
  99. .RS 2
  100. The variables \fBtclAppName\fR, \fBtclAppLongname\fR, \fBtclAppVersion\fR 
  101. must be set before calling thus routine if special values are desired.
  102. .RE
  103. .PP
  104. Returns:
  105. .RS 2
  106. \fBTCL_OK\fR if all is ok, \fBTCL_ERROR\fR if an error occurred.
  107. .RE
  108. '
  109. .SS Tcl_Startup
  110. .PP
  111. Initializes the Tcl extended environment.  This function processes the
  112. standard command line arguments and locates the Tcl initialization file.
  113. It then sources the initialization file.
  114. Either an interactive command loop is created or a Tcl script file
  115. is executed depending on the command line.  This functions calls
  116. Tcl_ShellEnvInit, so it should not be called separately.
  117. .PP
  118. Parameters
  119. .RS 2
  120. \fBo \fIinterp\fR - A pointer to the interpreter.
  121. .br
  122. \fBo \fIoptions\fR - Options that control startup behavior.  None are currently
  123. defined.
  124. .br
  125. \fBo \fIargc, argv\fR - Arguments passed to main for the command line.
  126. .RE
  127. .PP
  128. Notes:
  129. .RS 2
  130. The variables \fBtclAppName\fR, \fBtclAppLongname\fR, \fBtclAppVersion\fR
  131. must be set before calling thus routine if special values are desired.
  132. .RE
  133. '
  134. .SS Tcl_ProcessInitFile
  135. .PP
  136. Find and evaludate a Tcl init file.  This assumes that the init file
  137. lives in a master directory and appends the directory name to the 
  138. "auto_path" variable.
  139. .PP
  140. Parameters:
  141. .RS 2
  142. \fBo \fIinterp\fR - A pointer to the interpreter
  143. .br
  144. \fBo dirEnvVar (I) - Environment variable used to override the directory path.
  145. .br
  146. \fBo dir\fR (I) - The directory name.
  147. \fBo version1, version2\fR - Two part version number forming a directory under
  148. dir.  Either maybe NULL.
  149. .br
  150. \fBo initFile (I) - The name of the init file, which is found either in the
  151. directory pointed to by envVar or by the directory formed from dir1,
  152. dir2 & dir3.
  153. .RE
  154. .PP
  155. Returns:
  156. .RS 2
  157. \fBTCL_OK\fR if all is ok, \fBTCL_ERROR\fR if an error occurred.
  158. .RE
  159. '
  160.