source: buchla-68k/orig/DOC/ENV.TXT

Last change on this file was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Imported original source code.

  • Property mode set to 100755
File size: 1.3 KB
Line 
1
2 Environment Strings
3 Beckemeyer Development Tools
4
5ENV.O contains two functions from the UNIX (tm) run-time library.
6It is provided at no extra cost to purchasers of MICRO C-Tools.
7
8The distribution diskette contains the C source file in the \SRC
9directory.
10
11Descriptions of the two functions follow:
12
13Getenv
14------
15 char *getenv(name)
16 char *name; /* name of environment variable */
17
18The getenv function searches the envronment table for the given
19variable. It returns a pointer the value of the variable, or
20a NULL pointer if the variable cannot be found.
21
22
23Putenv
24------
25 int putenv(string)
26 char *string;
27
28The putenv function adds a new environment variable or modifies an
29existing one. String must be a pointer to a string of the form:
30
31 name=value
32
33where name is the name of the environment variable to add or modify,
34and value is the value to assign to that variable.
35
36Putenv returns 0 if it is successfull. A return value of -1 indicates
37an error.
38
39
40IMPORTANT NOTES
41---------------
42
43You cannot modify the environment directly. Always use the putenv
44function to add or change environment variables. To change the
45value of the string returned by getenv without affecting the
46environment, use strcpy to make a copy of the string.
47
48
Note: See TracBrowser for help on using the repository browser.