File ModuleCmd_Use.c

 ** ** Module Header ******************************************************* **
 ** 									     **
 **   Modules Revision 3.0						     **
 **   Providing a flexible user environment				     **
 ** 									     **
 **   File:		ModuleCmd_Use.c					     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Authors:	John Furlan, jlf@behere.com				     **
 **		Jens Hamisch, jens@Strawberry.COM			     **
 ** 									     **
 **   Description:	Prepends (and appends) directories to the MODULEPATH **
 **			environment variable to enable access to more	     **
 **			modulefiles.					     **
 ** 									     **
 **   Exports:		ModuleCmd_Use					     **
 **			ModuleCmd_UnUse					     **
 ** 									     **
 **   Notes:								     **
 ** 									     **
 ** ************************************************************************ **
References Variables: IdModuleCmd_Use.c

Included Files


Local Variables

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

UseId
static void* UseId[]

module_name
static char module_name[]
Used in: ModuleCmd_UnUse()
  ModuleCmd_Use()
  append_to_modulesbeginenv()


Global Function ModuleCmd_UnUse()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		ModuleCmd_UnUse					     **
 ** 									     **
 **   Description:	Execution of the module-command 'unuse'		     **
 ** 									     **
 **   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:	-						     **
 ** 									     **
 ** ************************************************************************ **
int ModuleCmd_UnUse ( Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: Module_Error()error.c
  append_to_modulesbeginenv()ModuleCmd_Use.c
  cmdRemovePath()cmdPath.c
Called by: ModuleCmd_Use()ModuleCmd_Use.c
  cmdModule()cmdModule.c
References Variables: module_nameModuleCmd_Use.c

Global Function ModuleCmd_Use()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		ModuleCmd_Use					     **
 ** 									     **
 **   Description:	Execution of the module-command 'use'		     **
 ** 									     **
 **   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		Controllig the callback functions    **
 ** 									     **
 ** ************************************************************************ **
int ModuleCmd_Use ( Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: ModuleCmd_UnUse()ModuleCmd_Use.c
  Module_Error()error.c
  append_to_modulesbeginenv()ModuleCmd_Use.c
  cmdSetPath()cmdPath.c
  stat(), strcmp()
Called by: cmdModule()cmdModule.c
References Variables: append_flagmain.c
  g_flagsmain.c
  module_nameModuleCmd_Use.c

Local Function append_to_modulesbeginenv()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		append_to_modulesbeginenv			     **
 ** 									     **
 **   Description:	Append the passed variable (with value) to the begin-**
 **			ning environment				     **
 ** 									     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Parameters:	Tcl_Interp	*interp		Attached Tcl Interp. **
 **			char 		*var		Name of the variable **
 ** 									     **
 **   Result:		-						     **
 ** 									     **
 **   Attached Globals:	-						     **
 ** 									     **
 ** ************************************************************************ **
static void append_to_modulesbeginenv ( Tcl_Interp* interp, char* var )
Prototyped in: ModuleCmd_Use.c
Calls: Module_Error()error.c
  Tcl_GetVar2(), fclose(), fopen(), fprintf()
Called by: ModuleCmd_UnUse()ModuleCmd_Use.c
  ModuleCmd_Use()ModuleCmd_Use.c
References Variables: module_nameModuleCmd_Use.c