Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

geteni.c

Go to the documentation of this file.
00001 /*
00002  * $Id: geteni.c,v 1.2 2009/02/16 08:04:37 schubert Exp $
00003  *
00004  * Revision 1.1.1.1  2002/06/16 15:18:46  hristov
00005  * Separate distribution  of Geant3
00006  *
00007  * Revision 1.1.1.1  1999/05/18 15:55:28  fca
00008  * AliRoot sources
00009  *
00010  * Revision 1.3  1997/09/02 14:26:36  mclareni
00011  * WINNT correction
00012  *
00013  * Revision 1.2  1997/02/04 17:34:17  mclareni
00014  * Merge Winnt and 97a versions
00015  *
00016  * Revision 1.1.1.1.2.1  1997/01/21 11:29:27  mclareni
00017  * All mods for Winnt 96a on winnt branch
00018  *
00019  * Revision 1.1.1.1  1996/02/15 17:49:22  mclareni
00020  * Kernlib
00021  *
00022  */
00023 #include "kerngen/pilot.h"
00024 #include "kerngen/fortranc.h"
00025 
00026 /*>    ROUTINE GETENI
00027   CERN PROGLIB# Z265    GETENI          .VERSION KERNFOR  4.31  911111
00028   ORIG. 22/02/91, JZ
00029   Fortran interface routine to getenv
00030 
00031       CALL GETENVF (NAME, TEXT*)
00032 
00033           NAME  the name of the environment variable,
00034           TEXT  returns its value
00035                 ISLATE(1) returns its length
00036 */
00037 #include <stdio.h>
00038 #include <stdlib.h>
00039 #include "kerngen/fortchar.h"
00040 #if defined(CERNLIB_QX_SC)
00041 void type_of_call geteni_(fname, ftext, lgtext, lgname)
00042 #endif
00043 #if defined(CERNLIB_QXNO_SC)
00044 void type_of_call geteni(fname, ftext, lgtext, lgname)
00045 #endif
00046 #if defined(CERNLIB_QXCAPT)
00047 #  ifdef CERNLIB_MSSTDCALL
00048     void type_of_call GETENI(fname, len_fname, ftext, len_ftext, lgtext, lgname)
00049      int len_fname, len_ftext;
00050 #  else
00051     void type_of_call GETENI(fname, ftext, lgtext, lgname)
00052 # endif
00053 #endif
00054 #if defined(CERNLIB_QMCRY)
00055       _fcd  fname,  ftext;
00056 #endif
00057 #if !defined(CERNLIB_QMCRY)
00058       char *fname, *ftext;
00059 #endif
00060       int  *lgtext, *lgname;
00061 {
00062       char *ptname, *fchtak();
00063       char *pttext, *getenv();
00064       int  fchput();
00065 
00066       pttext = NULL;
00067       ptname = fchtak(fname,*lgname);
00068       if (ptname == NULL)          goto out;
00069       pttext = getenv (ptname);
00070       free(ptname);
00071 
00072 out:  *lgtext = fchput (pttext,ftext,*lgtext);
00073       return;
00074 }
00075 /*> END <----------------------------------------------------------*/

Generated on Mon Feb 15 11:06:46 2010 for loon by  doxygen 1.3.9.1