* 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:
Almindor 2006-10-04 21:11:57 +00:00
parent 7b4d4c1406
commit 85bb8872be

View File

@ -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;