]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MINICERN/packlib/kernlib/kerngen/ccgen/geteni.c
Bugfix in AliPoints2Memory
[u/mrichter/AliRoot.git] / MINICERN / packlib / kernlib / kerngen / ccgen / geteni.c
CommitLineData
fe4da5cc 1/*
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.3 1997/09/02 14:26:36 mclareni
6 * WINNT correction
7 *
8 * Revision 1.2 1997/02/04 17:34:17 mclareni
9 * Merge Winnt and 97a versions
10 *
11 * Revision 1.1.1.1.2.1 1997/01/21 11:29:27 mclareni
12 * All mods for Winnt 96a on winnt branch
13 *
14 * Revision 1.1.1.1 1996/02/15 17:49:22 mclareni
15 * Kernlib
16 *
17 */
18#include "kerngen/pilot.h"
19#include "kerngen/fortranc.h"
20
21/*> ROUTINE GETENI
22 CERN PROGLIB# Z265 GETENI .VERSION KERNFOR 4.31 911111
23 ORIG. 22/02/91, JZ
24 Fortran interface routine to getenv
25
26 CALL GETENVF (NAME, TEXT*)
27
28 NAME the name of the environment variable,
29 TEXT returns its value
30 ISLATE(1) returns its length
31*/
32#include <stdio.h>
33#include "kerngen/fortchar.h"
34#if defined(CERNLIB_QX_SC)
35void type_of_call geteni_(fname, ftext, lgtext, lgname)
36#endif
37#if defined(CERNLIB_QXNO_SC)
38void type_of_call geteni(fname, ftext, lgtext, lgname)
39#endif
40#if defined(CERNLIB_QXCAPT)
41# ifdef CERNLIB_MSSTDCALL
42 void type_of_call GETENI(fname, len_fname, ftext, len_ftext, lgtext, lgname)
43 int len_fname, len_ftext;
44# else
45 void type_of_call GETENI(fname, ftext, lgtext, lgname)
46# endif
47#endif
48#if defined(CERNLIB_QMCRY)
49 _fcd fname, ftext;
50#endif
51#if !defined(CERNLIB_QMCRY)
52 char *fname, *ftext;
53#endif
54 int *lgtext, *lgname;
55{
56 char *ptname, *fchtak();
57 char *pttext, *getenv();
58 int fchput();
59
60 pttext = NULL;
61 ptname = fchtak(fname,*lgname);
62 if (ptname == NULL) goto out;
63 pttext = getenv (ptname);
64 free(ptname);
65
66out: *lgtext = fchput (pttext,ftext,*lgtext);
67 return;
68}
69/*> END <----------------------------------------------------------*/