(C) 1998 AROS - The Amiga Research OS


NAME
#include <dos/var.h>
#include <proto/dos.h>

BOOL SetVar (name , buffer , size , flags)

LOCATION
In DOSBase at offset 150

SYNOPSIS
STRPTR name
STRPTR buffer
LONG size
LONG flags

FUNCTION
This function will set a local of environmental variable. Although it is recommended that you only use ASCII strings within variables, this is not actually required.

INPUTS
name
The name of the variable to set.
buffer
The actual data of the variable.
size
The size of the data in the buffer.
flags
Combination of the type of variable to set (lower 8 bits of the value, and various flags which control this function. Flags defined are:

GVF_LOCAL_ONLY
set a local variable only,
GVF_GLOBAL_ONLY
set a global environmental variable only.
GVF_SAVE_VAR
If GVF_GLOBAL_ONLY is set, then this flag will cause SetVar() to save the variable to ENVARC: as well as to ENV:.

Note the default is to set a local environmental variable.

RESULT
Zero if this function failed, non-zero otherwise.

EXAMPLE

SEE ALSO
DeleteVar(), FindVar(), GetVar(),

NOTES

BUGS
Only type LV_VAR can be made global.

If you set GVF_SAVE_VAR, and this function returns failure, the variable may have still been set in ENV:.

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
26.04.1998 bergers
Setting and finding more than one local var is no luxury any more... :-)
25.04.1998 bergers
Bugfix. Setenv, Getenv, Set, Get are now working correctly.
28.11.1997 bergers
Fixed some bugs
16.08.1997 iaint
These may not always work, but try them anyway
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column