mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
* GetEnvironmentVariable now really merged
This commit is contained in:
parent
d093c5f047
commit
18a6af4e62
@ -744,6 +744,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{****************************************************************************
|
||||||
|
OS Utils
|
||||||
|
****************************************************************************}
|
||||||
|
|
||||||
|
Function GetEnvironmentVariable(Const EnvVar : String) : String;
|
||||||
|
|
||||||
|
var P: PChar;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if DosScanEnv (PChar (EnvVar), P) = 0
|
||||||
|
then GetEnvironmentVariable := StrPas (P)
|
||||||
|
else GetEnvironmentVariable := '';
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
Initialization code
|
Initialization code
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
@ -755,9 +771,13 @@ Finalization
|
|||||||
OutOfMemory.Free;
|
OutOfMemory.Free;
|
||||||
InValidPointer.Free;
|
InValidPointer.Free;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2001-02-20 22:14:19 peter
|
Revision 1.9 2001-02-21 21:23:38 hajny
|
||||||
|
* GetEnvironmentVariable now really merged
|
||||||
|
|
||||||
|
Revision 1.8 2001/02/20 22:14:19 peter
|
||||||
* merged getenvironmentvariable
|
* merged getenvironmentvariable
|
||||||
|
|
||||||
Revision 1.7 2001/01/13 11:10:59 hajny
|
Revision 1.7 2001/01/13 11:10:59 hajny
|
||||||
@ -788,17 +808,3 @@ end.
|
|||||||
* forgot the add command :(
|
* forgot the add command :(
|
||||||
|
|
||||||
}
|
}
|
||||||
{****************************************************************************
|
|
||||||
OS Utils
|
|
||||||
****************************************************************************}
|
|
||||||
|
|
||||||
Function GetEnvironmentVariable(Const EnvVar : String) : String;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Resumt:=Getenv(EnvVar);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
Revision 1.1.2.6 2001/02/20 21:19:28 michael
|
|
||||||
+ Added GetEnvironmentVariable function
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user