mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
* fixes windows linking/preprocessor (doesn't seem to understand "") and makes the code a bit cleaner
git-svn-id: trunk@4797 -
This commit is contained in:
parent
7b4d4c1406
commit
85bb8872be
@ -787,6 +787,14 @@ uses
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function maybequoted(const s:string):string;
|
function maybequoted(const s:string):string;
|
||||||
|
const
|
||||||
|
{$IFDEF MSWINDOWS}
|
||||||
|
FORBIDDEN_CHARS = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
||||||
|
'{', '}', '''', '`', '~'];
|
||||||
|
{$ELSE}
|
||||||
|
FORBIDDEN_CHARS = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
||||||
|
'{', '}', '''', ':', '\', '`', '~'];
|
||||||
|
{$ENDIF}
|
||||||
var
|
var
|
||||||
s1 : string;
|
s1 : string;
|
||||||
i : integer;
|
i : integer;
|
||||||
@ -809,12 +817,9 @@ uses
|
|||||||
s1:=s1+s[i];
|
s1:=s1+s[i];
|
||||||
end;
|
end;
|
||||||
else begin
|
else begin
|
||||||
if s[i] in ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
if s[i] in FORBIDDEN_CHARS then
|
||||||
'{', '}', '''', ';', ':', '\', '`', '~'] then begin
|
|
||||||
quoted:=True;
|
quoted:=True;
|
||||||
s1:=s1 + s[i];
|
s1:=s1+s[i];
|
||||||
end else
|
|
||||||
s1:=s1+s[i];
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user