File cmdUname.c

 ** ** Module Header ******************************************************* **
 ** 									     **
 **   Modules Revision 3.0						     **
 **   Providing a flexible user environment				     **
 ** 									     **
 **   File:		cmdUname.c					     **
 **   First Edition:	91/10/23					     **
 ** 									     **
 **   Authors:	John Furlan, jlf@behere.com				     **
 **		Jens Hamisch, jens@Strawberry.COM			     **
 ** 									     **
 **   Description:	Provides fast aquisition of the information available**
 **			via uname.  This shows a 10x improvement over having **
 **			to exec the actual uname program from within a	     **
 **			modulefile.					     **
 ** 									     **
 **   Exports:		cmdUname					     **
 ** 									     **
 **   Notes:								     **
 ** 									     **
 ** ************************************************************************ **
References Variables: IdcmdUname.c

Included Files


Preprocessor definitions

#define NAMELEN

#define DOMAINLEN


Local Variables

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

UseId
static void* UseId[]

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

namestruct
static struct utsname namestruct
Used in: cmdUname()

domain
static char domain[(64+1)]
Used in: cmdUname()

namestruct_init
static int namestruct_init
Used in: cmdUname()


Global Function cmdUname()

 ** ** Function-Header ***************************************************** **
 ** 									     **
 **   Function:		cmdUname					     **
 ** 									     **
 **   Description:	Callback function for  the commands 'sysname',	     **
 **			'nodename', 'release', 'version' and 'machine'       **
 ** 									     **
 **   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:	flags		These are set up accordingly before  **
 **					this function is called in order to  **
 **					control everything		     **
 ** 									     **
 ** ************************************************************************ **
int cmdUname ( ClientData client_data, Tcl_Interp* interp, int argc, char* argv[] )
Prototyped in: modules_def.h
Calls: Module_Error()error.c
  Tcl_SetResult(), getdomainname(), strlen(), strncmp(), uname()
Used in: InitializeModuleCommands()init.c
References Variables: domaincmdUname.c
  module_namecmdUname.c
  namestructcmdUname.c
  namestruct_initcmdUname.c