mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 03:39:33 +02:00
* explicitly call *A routines from ansistring environment variable routines
git-svn-id: branches/cpstrrtl@25102 -
This commit is contained in:
parent
d919794fdf
commit
08099c8558
@ -978,7 +978,7 @@ begin
|
|||||||
oemenvvar:=uppercase(envvar);
|
oemenvvar:=uppercase(envvar);
|
||||||
SetCodePage(oemenvvar,CP_OEMCP);
|
SetCodePage(oemenvvar,CP_OEMCP);
|
||||||
Result:='';
|
Result:='';
|
||||||
p:=GetEnvironmentStrings;
|
p:=GetEnvironmentStringsA;
|
||||||
hp:=p;
|
hp:=p;
|
||||||
while hp^<>#0 do
|
while hp^<>#0 do
|
||||||
begin
|
begin
|
||||||
@ -996,7 +996,7 @@ begin
|
|||||||
{ next string entry}
|
{ next string entry}
|
||||||
hp:=hp+hplen+1;
|
hp:=hp+hplen+1;
|
||||||
end;
|
end;
|
||||||
FreeEnvironmentStrings(p);
|
FreeEnvironmentStringsA(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function GetEnvironmentVariableCount : Integer;
|
Function GetEnvironmentVariableCount : Integer;
|
||||||
@ -1005,7 +1005,7 @@ var
|
|||||||
hp,p : pchar;
|
hp,p : pchar;
|
||||||
begin
|
begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
p:=GetEnvironmentStrings;
|
p:=GetEnvironmentStringsA;
|
||||||
hp:=p;
|
hp:=p;
|
||||||
If (Hp<>Nil) then
|
If (Hp<>Nil) then
|
||||||
while hp^<>#0 do
|
while hp^<>#0 do
|
||||||
@ -1013,7 +1013,7 @@ begin
|
|||||||
Inc(Result);
|
Inc(Result);
|
||||||
hp:=hp+strlen(hp)+1;
|
hp:=hp+strlen(hp)+1;
|
||||||
end;
|
end;
|
||||||
FreeEnvironmentStrings(p);
|
FreeEnvironmentStringsA(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function GetEnvironmentString(Index : Integer) : String;
|
Function GetEnvironmentString(Index : Integer) : String;
|
||||||
@ -1022,7 +1022,7 @@ var
|
|||||||
hp,p : pchar;
|
hp,p : pchar;
|
||||||
begin
|
begin
|
||||||
Result:='';
|
Result:='';
|
||||||
p:=GetEnvironmentStrings;
|
p:=GetEnvironmentStringsA;
|
||||||
hp:=p;
|
hp:=p;
|
||||||
If (Hp<>Nil) then
|
If (Hp<>Nil) then
|
||||||
begin
|
begin
|
||||||
@ -1034,7 +1034,7 @@ begin
|
|||||||
If (hp^<>#0) then
|
If (hp^<>#0) then
|
||||||
Result:=StrPas(HP);
|
Result:=StrPas(HP);
|
||||||
end;
|
end;
|
||||||
FreeEnvironmentStrings(p);
|
FreeEnvironmentStringsA(p);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$pop}
|
{$pop}
|
||||||
|
Loading…
Reference in New Issue
Block a user