|
@@ -24,7 +24,7 @@
|
|
unique : Boolean;
|
|
unique : Boolean;
|
|
begin
|
|
begin
|
|
InternalChangeCase := S;
|
|
InternalChangeCase := S;
|
|
- if InternalChangeCase = '' then
|
|
|
|
|
|
+ if Length(InternalChangeCase) then
|
|
exit;
|
|
exit;
|
|
unique := false;
|
|
unique := false;
|
|
p := PWideChar(InternalChangeCase);
|
|
p := PWideChar(InternalChangeCase);
|
|
@@ -74,12 +74,12 @@
|
|
FreeEnvironmentStringsW(p);
|
|
FreeEnvironmentStringsW(p);
|
|
end;
|
|
end;
|
|
|
|
|
|
- function getTempDir: String;
|
|
|
|
|
|
+ function getTempDir: ShortString;
|
|
var
|
|
var
|
|
astringLength : Integer;
|
|
astringLength : Integer;
|
|
begin
|
|
begin
|
|
getTempDir := GetEnvironmentVariable('TMP');
|
|
getTempDir := GetEnvironmentVariable('TMP');
|
|
- if getTempDir = '' then
|
|
|
|
|
|
+ if Length(getTempDir)=0 then
|
|
getTempDir := GetEnvironmentVariable('TEMP');
|
|
getTempDir := GetEnvironmentVariable('TEMP');
|
|
astringlength := Length(getTempDir);
|
|
astringlength := Length(getTempDir);
|
|
if (astringlength > 0) and (getTempDir[astringlength] <> DirectorySeparator) then
|
|
if (astringlength > 0) and (getTempDir[astringlength] <> DirectorySeparator) then
|
|
@@ -90,10 +90,10 @@
|
|
|
|
|
|
{$ELSEIF defined(UNIX) and not defined(android)}
|
|
{$ELSEIF defined(UNIX) and not defined(android)}
|
|
|
|
|
|
- function getTempDir: string;
|
|
|
|
|
|
+ function getTempDir: shortstring;
|
|
var
|
|
var
|
|
- key: string;
|
|
|
|
- value: string;
|
|
|
|
|
|
+ key: shortstring;
|
|
|
|
+ value: shortstring;
|
|
i_env, i_key, i_value: integer;
|
|
i_env, i_key, i_value: integer;
|
|
begin
|
|
begin
|
|
value := '/tmp/'; (** default for UNIX **)
|
|
value := '/tmp/'; (** default for UNIX **)
|
|
@@ -130,7 +130,7 @@
|
|
|
|
|
|
{$ELSE} // neither unix nor windows
|
|
{$ELSE} // neither unix nor windows
|
|
|
|
|
|
- function getTempDir: string;
|
|
|
|
|
|
+ function getTempDir: shortstring;
|
|
begin
|
|
begin
|
|
getTempDir:='';
|
|
getTempDir:='';
|
|
end;
|
|
end;
|