File cmdConflict.c

 ** ** Module Header ******************************************************* **
 ** 									     **
 **   Modules Revision 3.0						     **
 **   Providing a flexible user environment				     **
 ** 									     **
 **   File:		cmdConflict.c					     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Authors:	John Furlan, jlf@behere.com				     **
 **		Jens Hamisch, jens@Strawberry.COM			     **
 ** 									     **
 **   Description:	The Tcl conflict and prereq commands.		     **
 ** 									     **
 **   Exports:		cmdConflict					     **
 **			cmdPrereq					     **
 ** 									     **
 **   Notes:								     **
 ** 									     **
 ** ************************************************************************ **
References Variables: IdcmdConflict.c

Included Files


Local Variables

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

UseId
static void* UseId[]

error_module
static char error_module[1024]
Used in: checkConflict()
  cmdConflict()

module_name
static char module_name[]
Used in: checkConflict()
  cmdConflict()
  cmdPrereq()


Global Function cmdConflict()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		cmdConflict					     **
 ** 									     **
 **   Description:	Callback function for 'confilct'		     **
 ** 									     **
 **   First Edition:	91/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		     **
 ** 									     **
 ** ************************************************************************ **
int cmdConflict ( ClientData client_data, Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: Module_Error()error.c
  SortedDirList()locate_module.c
  SplitIntoList()locate_module.c
  checkConflict()cmdConflict.c
  fprintf(), getenv()
Used in: InitializeModuleCommands()init.c
References Variables: error_modulecmdConflict.c
  g_current_modulemain.c
  g_flagsmain.c
  module_namecmdConflict.c

Global Function cmdPrereq()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		cmdPrereq					     **
 ** 									     **
 **   Description:	Callback function for 'prereq'			     **
 ** 									     **
 **   First Edition:	91/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		     **
 ** 									     **
 ** ************************************************************************ **
int cmdPrereq ( ClientData client_data, Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: IsLoaded()utility.c
  Module_Error()error.c
  SortedDirList()locate_module.c
  SplitIntoList()locate_module.c
  fprintf(), getenv(), malloc(), strcpy(), strlen()
Used in: InitializeModuleCommands()init.c
References Variables: g_current_modulemain.c
  g_flagsmain.c
  module_namecmdConflict.c

Local Function checkConflict()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		checkConflict					     **
 ** 									     **
 **   Description:	Check whether the 'g_current_module' is in the list  **
 **			of passed modules				     **
 ** 									     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Parameters:	Tcl_Interp	*interp		According Tcl interp.**
 **			char		*path		Modulepath to be chk.**
 **			char		**modulelist	List of loaded mod.  **
 **			int		 nummodules	Number of loaded mod.**
 ** 									     **
 **   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	Module to check for	     **
 ** 									     **
 ** ************************************************************************ **
static int checkConflict ( Tcl_Interp* interp, char* path, char** modulelist, unsigned int nummodules )
Prototyped in: cmdConflict.c
Calls: IsLoaded_ExactMatch()utility.c
  Module_Error()error.c
  SortedDirList()locate_module.c
  checkConflict()cmdConflict.c
  memset(), stat(), strcat(), strcmp(), strcpy()
Called by: checkConflict()cmdConflict.c
  cmdConflict()cmdConflict.c
References Variables: error_modulecmdConflict.c
  g_current_modulemain.c
  module_namecmdConflict.c