** ** Module Header ******************************************************* ** ** ** ** Modules Revision 3.0 ** ** Providing a flexible user environment ** ** ** ** File: cmdModule.c ** ** First Edition: 1991/10/23 ** ** ** ** Authors: John Furlan, jlf@behere.com ** ** Jens Hamisch, jens@Strawberry.COM ** ** ** ** Description: The actual module command from the Tcl level. This ** ** routines calls other ModuleCmd routines to carry out ** ** the subcommand requested. ** ** ** ** Exports: cmdModule ** ** Read_Modulefile ** ** Execute_TclFile ** ** CallModuleProcedure ** ** ** ** Notes: ** ** ** ** ************************************************************************ **
| References Variables: | Id | cmdModule.c |
| Used in: | cmdModule.c |
module_name
static char module_name[]
| Used in: | CallModuleProcedure() | |
| Execute_TclFile() | ||
| Read_Modulefile() | ||
| cmdModule() |
** ** Function-Header ***************************************************** ** ** ** ** Function: CallModuleProcedure ** ** ** ** Description: Call a Tcl Procedure ** ** Executes the passed modulefile (conditionally hidden)** ** and then evaluates the passed Tcl procedure ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** Tcl_DString *cmdptr Buffer fot the Tcl ** ** command ** ** char *modulefile According module file** ** char *procname Name of the Tcl Proc.** ** int suppress_output Controlls redirect.** ** of stdout and stderr ** ** ** ** Result: int TCL_OK Successfull completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: - ** ** ** ** ************************************************************************ **int CallModuleProcedure ( Tcl_Interp* interp, Tcl_DString* cmdptr, char* modulefile, char* procname, int suppress_output )
| Prototyped in: | modules_def.h | |
| Calls: | Module_Error() | error.c |
| Read_Modulefile() | cmdModule.c | |
| Tcl_DStringAppend(), Tcl_DStringSetLength(), Tcl_Eval(), close(), dup(), fflush(), open(), strcat(), strcpy() | ||
| Called by: | ModuleCmd_Display() | ModuleCmd_Display.c |
| ModuleCmd_Refresh() | ModuleCmd_Refresh.c | |
| ModuleCmd_Whatis() | ModuleCmd_Whatis.c | |
| PerModuleHelp() | ModuleCmd_Help.c | |
| whatis_dir() | ModuleCmd_Whatis.c | |
| References Variables: | _fil_devnull | cmdModule.c |
| _fil_stderr | cmdModule.c | |
| _fil_stdout | cmdModule.c | |
| module_name | cmdModule.c | |
** ** Function-Header ***************************************************** ** ** ** ** Function: Execute_TclFile ** ** ** ** Description: Read in and execute all commands concerning the Tcl ** ** file passed as parameter ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *filename ** ** ** ** Result: int TCL_OK Successfull completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: line Input read buffer ** ** ** ** ************************************************************************ **int Execute_TclFile ( Tcl_Interp* interp, char* filename )
| Prototyped in: | modules_def.h | |
| Calls: | Module_Error() | error.c |
| Tcl_CommandComplete(), Tcl_DStringAppend(), Tcl_DStringFree(), Tcl_DStringInit(), Tcl_DStringSetLength(), Tcl_Eval(), Tcl_SetVar(), fclose(), fgets(), fopen(), malloc(), strcmp() | ||
| Called by: | Read_Modulefile() | cmdModule.c |
| SourceRC() | locate_module.c | |
| SourceVers() | locate_module.c | |
| cmdModule() | cmdModule.c | |
| References Variables: | _fil_stdin | cmdModule.c |
| line | main.c | |
| linenum | cmdModule.c | |
| module_name | cmdModule.c | |
** ** Function-Header ***************************************************** ** ** ** ** Function: Read_Modulefile ** ** ** ** Description: Check the passed filename for to be a valid module ** ** and execute the according command file ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: Tcl_Interp *interp According Tcl interp.** ** char *filename ** ** ** ** Result: int TCL_OK Successfull completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: ** ** ** ** ************************************************************************ **int Read_Modulefile ( Tcl_Interp* interp, char* filename )
| Prototyped in: | modules_def.h | |
| Calls: | Execute_TclFile() | cmdModule.c |
| Module_Error() | error.c | |
| check_magic() | utility.c | |
| null_free() | utility.c | |
| Tcl_RegExpCompile(), Tcl_RegExpExec(), Tcl_RegExpRange(), atoi(), strcmp(), strdup() | ||
| Called by: | CallModuleProcedure() | cmdModule.c |
| ModuleCmd_Load() | ModuleCmd_Load.c | |
| ModuleCmd_Switch() | ModuleCmd_Switch.c | |
| References Variables: | _fil_stdin | cmdModule.c |
| module_name | cmdModule.c | |
** ** Function-Header ***************************************************** ** ** ** ** Function: cmdModule ** ** ** ** Description: Evaluation of the module command line and callup of ** ** the according subroutine ** ** ** ** First Edition: 1991/10/23 ** ** ** ** Parameters: ClientData client_data ** ** Tcl_Interp *interp According Tcl interp.** ** int argc Number of arguments ** ** char *argv[] Argument array ** ** ** ** Result: int TCL_OK Successfull completion ** ** TCL_ERROR Any error ** ** ** ** Attached Globals: g_flags These are set up accordingly before ** ** this function is called in order to ** ** control everything ** ** g_current_module The module which is handled ** ** by the current command ** ** ** ** ************************************************************************ **int cmdModule ( ClientData client_data, Tcl_Interp* interp, int argc, const char* argv[] )