#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "../command.h"
Go to the source code of this file.
Defines | |
#define | MAX_ENVIRV_LEN 256 |
Functions | |
if (memory_IsUndef(Op1)) | |
if (TYPE(Op1)==VTYPE_LONG) | |
memcpy (STRINGVALUE(RESULT), s, sLen) | |
if (pEo->CmdLineArgument==NULL) | |
memcpy (STRINGVALUE(RESULT), pEo->CmdLineArgument, q) | |
Variables | |
char ** | _environ |
NODE | nItem |
VARIABLE | Op1 |
char * | s |
char | buffer [MAX_ENVIRV_LEN] |
size_t | sLen |
char ** | EnvironmentPointer |
long | index |
char *(* | EnvirFunc )(void *, char *, long) |
USE_CALLER_MORTALS | |
nItem = PARAMETERLIST | |
Op1 = _EVALUATEEXPRESSION(CAR(nItem)) | |
ASSERTOKE | |
EnvirFunc = pEo->fpEnvirFunction | |
RESULT = NEWMORTALSTRING(sLen) | |
END int | q |
USE_CALLER_MORTALS | |
RESULT = NEWMORTALSTRING(q=strlen(pEo->CmdLineArgument)) |
|
|
|
|
|
Definition at line 96 of file environ.c. References _environ, EnvirFunc, LONGVALUE(), NULL, pEo, RESULT, and RETURN. |
|
Definition at line 90 of file environ.c. References NULL, RESULT, and RETURN. Referenced by allocset(), besFUNCTION(), p_b_cclass(), p_b_coll_elem(), regatoi(), and regerror(). |
|
|
|
|
Definition at line 95 of file stndlone.c. Referenced by if(). |
|
Definition at line 88 of file environ.c. Referenced by COMMAND_EXTERNAL(), COMMAND_FUNCTIONARG(), if(), and while(). |
|
Definition at line 77 of file environ.c. Referenced by _State(), execute_Convert2String(), and file_deltree(). |
|
|
|
Definition at line 81 of file environ.c. Referenced by if(). |
|
|
|
Definition at line 80 of file environ.c. Referenced by getoptt(), JokerMatch(), match_ModifySet(), match_parameter(), match_size(), MD5Final(), and MD5Update(). |
|
|
|
ENVIRON =section misc =title ENVIRON("envsymbol") or ENVIRON(n) =display ENVIRON() This function returns the value of an environment variable. Environment variables are string values associated to names that are provided by the executing environment for the programs. The executing environment is usually the operating system, but it can also be the Web server in CGI programs that alters the environment variables provided by the surrounding operating system specifying extra values. This function can be used to get the string of an environment variable in case the program knows the name of the variable or to list all the environment variables one by one. If the environment variable name is known then the name as a string has to be passed to this function as argument. In this case the return value is the value of the environment variable. If the program wants to list all the environment variables the argument to the function T<ENVIRON> can be an integer number T<n>. In this case the function returns a string containing the name and the value joined by a T<=> sign of the T<n>-th environment variable. The numbering starts with T<n=0>. If the argument value is integer and is out of the range of the possible environment variable ordinal numbers (negative or larger or equal to the number of the available environment variables) then the function returns T<undef>. If the argument to the function is T<undef> then the function also returns the T<undef> value. Note that ScriptBasic provides an easy way for the embedding applications to redefine the underlying function that returns the environment variable. Thus an embedding application can "fool" a BASIC program providing its own environment variable. For example the Eszter SB Application Engine provides an alternative environment variable reading function and thus BASIC applications can read the environment using the function T<ENVIRON> as if the program was running in a real CGI environment. =details The following sample code prints all environment variables: =verbatim i=0 do e$ = environ(i) if IsDefined(e$) then print e$ print endif i = i + 1 loop while IsDefined(e$) =noverbatim Definition at line 74 of file environ.c. Referenced by COMMAND_EXTERNAL(), COMMAND_FUNCTIONARG(), execute_ExecuteFunction(), and hook_CallScribaFunction(). |
|
|
|
Definition at line 75 of file environ.c. Referenced by if(). |
|
|
|
|
Definition at line 131 of file environ.c. Referenced by besCOMMAND(), besFUNCTION(), and if(). |
|
|
Definition at line 78 of file environ.c. Referenced by ex_IsCommandOPEN(), ex_IsCommandThis(), execute_Convert2Double(), execute_Convert2Long(), execute_GetDoubleValue(), execute_GetLongValue(), execute_IsStringInteger(), and while(). |
|
|
|
|