5 * Revision 1.2 1997/02/04 17:34:39 mclareni
6 * Merge Winnt and 97a versions
8 * Revision 1.1.1.1.2.1 1997/01/21 11:29:40 mclareni
9 * All mods for Winnt 96a on winnt branch
11 * Revision 1.1.1.1 1996/02/15 17:49:26 mclareni
16 CERN PROGLIB# Z265 SETENI .VERSION KERNFOR 4.36 930602
18 Fortran interface routine to putenv
20 CALL SETENVF (NAME, TEXT*)
22 NAME the name of the environment variable,
23 TEXT the value to be assigned
26 #include "kerngen/fortchar.h"
27 #include "kerngen/fortranc.h"
29 #if defined(CERNLIB_QX_SC)
30 int type_of_call seteni_(fname, ftext, lgname, lgtext)
32 #if defined(CERNLIB_QXNO_SC)
33 int type_of_call seteni(fname, ftext, lgname, lgtext)
35 #if defined(CERNLIB_QXCAPT)
36 int type_of_call SETENI(fname, ftext, lgname, lgtext)
38 #if defined(CERNLIB_QMCRY)
41 #if !defined(CERNLIB_QMCRY)
46 char *ptname, *pttext, *pts, *ptt, *fchtak();
47 int nname, ntext, istat, putenv();
53 ntot = nname + 1 + ntext;
55 ptname = fchtak(fname,ntot);
56 if (ptname == NULL) goto out1;
57 pttext = fchtak(ftext,ntext);
58 if (pttext == NULL) goto out2;
63 for (j = 0; j <= ntext; j++) *ptt++ = *pts++;
65 istat = putenv (ptname);
67 if (istat == 0) return 0;
72 /*> END <----------------------------------------------------------*/