#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <crt_externs.h>
#include "epicsStdio.h"
#include "envDefs.h"
#include "iocsh.h"
Go to the source code of this file.
|
LIBCOM_API void epicsStdCall | epicsEnvSet (const char *name, const char *value) |
| Set an environment variable's value. More...
|
|
LIBCOM_API void epicsStdCall | epicsEnvUnset (const char *name) |
| Clear the value of an environment variable. More...
|
|
LIBCOM_API void epicsStdCall | epicsEnvShow (const char *name) |
| Print value of an environment variable, or all variables. More...
|
|
#define environ (*_NSGetEnviron()) |
LIBCOM_API void epicsStdCall epicsEnvSet |
( |
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
Set an environment variable's value.
The setenv() routine is not available on all operating systems. This routine provides a portable alternative for all EPICS targets.
- Parameters
-
name | Environment variable name. |
value | New value for environment variable. |
Definition at line 35 of file osdEnv.c.
39 setenv(name,
value, 1);
void epicsStdCall iocshEnvClear(const char *name)
LIBCOM_API void epicsStdCall epicsEnvShow |
( |
const char * |
name | ) |
|
Print value of an environment variable, or all variables.
- Parameters
-
name | Environment variable name, or NULL to show all. |
Definition at line 55 of file osdEnv.c.
61 for (sp = environ ; (sp !=
NULL) && (*sp !=
NULL) ; sp++)
65 const char *cp = getenv (name);
67 printf (
"%s is not an environment variable.\n", name);
69 printf (
"%s=%s\n", name, cp);
LIBCOM_API void epicsStdCall epicsEnvUnset |
( |
const char * |
name | ) |
|
Clear the value of an environment variable.
- Parameters
-
name | Environment variable name. |
Definition at line 46 of file osdEnv.c.
void epicsStdCall iocshEnvClear(const char *name)