File ModuleCmd_Init.c

 ** ** Module Header ******************************************************* **
 ** 									     **
 **   Modules Revision 3.0						     **
 **   Providing a flexible user environment				     **
 ** 									     **
 **   File:		ModuleCmd_Init.c				     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Authors:	John Furlan, jlf@behere.com				     **
 **		Jens Hamisch, jens@Strawberry.COM			     **
 ** 									     **
 **   Description:	Routines that act on a user's "dot" startup files to **
 **			add, remove, and list modulefiles to/from/in their   **
 **			startup files.					     **
 ** 									     **
 **   Exports:		ModuleCmd_Init					     **
 ** 									     **
 **   Notes:								     **
 ** 									     **
 ** ************************************************************************ **
References Variables: IdModuleCmd_Init.c

Included Files


Local Variables

Id
static char Id[]
Used in:  ModuleCmd_Init.c

UseId
static void* UseId[]

module_name
static char module_name[]
Used in: ModuleCmd_Init()


Global Function ModuleCmd_Init()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		ModuleCmd_Init					     **
 ** 									     **
 **   Description:	Execution of the module-command 'init'		     **
 ** 									     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Parameters:	Tcl_Interp	*interp		Attached Tcl Interp. **
 **			int		 argc		Number of arguments  **
 **			char 		*argv[]		Argument list	     **
 ** 									     **
 **   Result:		int	TCL_ERROR	Failure			     **
 **				TCL_OK		Successfull operation	     **
 ** 									     **
 **   Attached Globals:	g_flags		These are set up accordingly before  **
 **					this function is called in order to  **
 **					control everything		     **
 ** 									     **
 ** ************************************************************************ **
int ModuleCmd_Init ( Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: Module_Error()error.c
  SetStartupFiles()init.c
  SplitIntoList()locate_module.c
  out_substr()ModuleCmd_Init.c
  Tcl_RegExpCompile(), Tcl_RegExpExec(), Tcl_RegExpRange(), fclose(), fgets(), fopen(), fprintf(), fputs(), getenv(), malloc(), rename(), strcat(), strcmp(), strcpy(), strdup(), strlen(), unlink()
Called by: cmdModule()cmdModule.c
References Variables: g_flagsmain.c
  module_nameModuleCmd_Init.c
  shell_namemain.c
  shell_startupsmain.c

Local Function out_substr()

static int out_substr ( FILE* stream, char* start, char* end )
Calls: fputs()
Called by: ModuleCmd_Init()ModuleCmd_Init.c