update dev300-m58
[ooovba.git] / dmake / msdos / zortech / environ.c
blobdea86f8c7e2129961f164af9639b36a4660f5019
1 /* RCS $Id: environ.c,v 1.1.1.1 2000-09-22 15:33:29 hr Exp $
2 --
3 -- SYNOPSIS
4 -- environment routines.
5 --
6 -- DESCRIPTION
7 -- Someone thought that Zortech needs this.
8 --
9 -- AUTHOR
10 -- Dennis Vadura, dvadura@dmake.wticorp.com
12 -- WWW
13 -- http://dmake.wticorp.com/
15 -- COPYRIGHT
16 -- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
17 --
18 -- This program is NOT free software; you can redistribute it and/or
19 -- modify it under the terms of the Software License Agreement Provided
20 -- in the file <distribution-root>/readme/license.txt.
22 -- LOG
23 -- Use cvs log to obtain detailed change logs.
25 /*LINTLIBRARY*/
26 #include <stdio.h>
27 #include <string.h>
28 #include <stdlib.h>
29 #include "alloc.h"
31 /* ZTC++ doesn't have environ, so we have to create one. */
33 extern char *_envptr;
34 char **environ = { NULL };
36 void
37 make_env()
39 int i;
40 char *cp;
42 for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
45 TALLOC(environ, i+1, char*);
47 for (i = 0, cp = _envptr; *cp; i++, cp += strlen(cp)+1)
48 environ[i] = cp;
50 return;
53 void
54 free_env()
56 FREE(environ);
58 return;