#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <envLib.h>
#include "cantProceed.h"
#include "epicsFindSymbol.h"
#include "epicsStdio.h"
#include "errlog.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 _VSB_CONFIG_FILE <../lib/h/config/vsbConfig.h> |
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.
40 printf (
"Usage: epicsEnvSet \"name\", \"value\"\n");
52 "Failed to set environment parameter \"%s\" to \"%s\": %s\n",
53 name,
value, strerror (errno));
void epicsStdCall iocshEnvClear(const char *name)
void errPrintf(long status, const char *pFileName, int lineno, const char *pformat,...)
LIBCOM_API void * mallocMustSucceed(size_t size, const char *msg)
A malloc() that never returns NULL.
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 80 of file osdEnv.c.
86 const char *cp = getenv (name);
88 printf (
"%s is not an environment variable.\n", name);
90 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 64 of file osdEnv.c.
void epicsStdCall iocshEnvClear(const char *name)