mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:39:36 +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;
|
||||
|
||||
function maybequoted(const s:string):string;
|
||||
const
|
||||
{$IFDEF MSWINDOWS}
|
||||
FORBIDDEN_CHARS = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
||||
'{', '}', '''', '`', '~'];
|
||||
{$ELSE}
|
||||
FORBIDDEN_CHARS = ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
||||
'{', '}', '''', ':', '\', '`', '~'];
|
||||
{$ENDIF}
|
||||
var
|
||||
s1 : string;
|
||||
i : integer;
|
||||
@ -809,12 +817,9 @@ uses
|
||||
s1:=s1+s[i];
|
||||
end;
|
||||
else begin
|
||||
if s[i] in ['!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
|
||||
'{', '}', '''', ';', ':', '\', '`', '~'] then begin
|
||||
if s[i] in FORBIDDEN_CHARS then
|
||||
quoted:=True;
|
||||
s1:=s1 + s[i];
|
||||
end else
|
||||
s1:=s1+s[i];
|
||||
s1:=s1+s[i];
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user