** ** 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: **
** **
** ************************************************************************ **
Included Files
- #include "modules_def.h"
- #include <stdio.h>
- #include <tcl.h>
- #include "config.h"
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
- #include <sys/types.h>
- #include <ctype.h>
- #include <sys/stat.h>
- #include <sys/termios.h>
- #include <fcntl.h>
- #include <sys/ioctl.h>
- #include <dirent.h>
- #include <errno.h>
Local Variables
Id
static char Id[]
UseId
static void* UseId[]
module_name
static char module_name[]
** ** 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[] )
** ** 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[] )
** ** 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 )