mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-28 13:44:51 +01:00
* use AllowDirectorySeparators
git-svn-id: trunk@10109 -
This commit is contained in:
parent
8c0adc7f3d
commit
7ceeb83014
@ -637,7 +637,7 @@ begin
|
|||||||
EndIndex := Length(AFilename);
|
EndIndex := Length(AFilename);
|
||||||
if EndIndex = 0 then
|
if EndIndex = 0 then
|
||||||
exit;
|
exit;
|
||||||
while not (AFilename[EndIndex] in DirSeparators) do
|
while not (AFilename[EndIndex] in AllowDirectorySeparators) do
|
||||||
begin
|
begin
|
||||||
Dec(EndIndex);
|
Dec(EndIndex);
|
||||||
if EndIndex = 0 then
|
if EndIndex = 0 then
|
||||||
@ -657,7 +657,7 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
PageDoc: TXMLDocument;
|
PageDoc: TXMLDocument;
|
||||||
Filename: String;
|
Filename: String;
|
||||||
begin
|
begin
|
||||||
if Engine.Output <> '' then
|
if Engine.Output <> '' then
|
||||||
Engine.Output := IncludeTrailingBackSlash(Engine.Output);
|
Engine.Output := IncludeTrailingBackSlash(Engine.Output);
|
||||||
for i := 0 to PageInfos.Count - 1 do
|
for i := 0 to PageInfos.Count - 1 do
|
||||||
@ -1198,8 +1198,8 @@ end;
|
|||||||
|
|
||||||
function THTMLWriter.AppendPasSHFragment(Parent: TDOMNode;
|
function THTMLWriter.AppendPasSHFragment(Parent: TDOMNode;
|
||||||
const AText: String; AShFlags: Byte): Byte;
|
const AText: String; AShFlags: Byte): Byte;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
Line, Last, p: PChar;
|
Line, Last, p: PChar;
|
||||||
IsInSpecial: Boolean;
|
IsInSpecial: Boolean;
|
||||||
@ -1207,37 +1207,37 @@ var
|
|||||||
El: TDOMElement;
|
El: TDOMElement;
|
||||||
|
|
||||||
Procedure MaybeOutput;
|
Procedure MaybeOutput;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
CurParent: TDomNode;
|
CurParent: TDomNode;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If (Last<>Nil) then
|
If (Last<>Nil) then
|
||||||
begin
|
begin
|
||||||
If (el<>Nil) then
|
If (el<>Nil) then
|
||||||
CurParent:=El
|
CurParent:=El
|
||||||
else
|
else
|
||||||
CurParent:=Parent;
|
CurParent:=Parent;
|
||||||
AppendText(CurParent,Last);
|
AppendText(CurParent,Last);
|
||||||
El:=Nil;
|
El:=Nil;
|
||||||
Last:=Nil;
|
Last:=Nil;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function NewEl(Const ElType,Attr,AttrVal : String) : TDomElement;
|
Function NewEl(Const ElType,Attr,AttrVal : String) : TDomElement;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=CreateEl(Parent,ElType);
|
Result:=CreateEl(Parent,ElType);
|
||||||
Result[Attr]:=AttrVal;
|
Result[Attr]:=AttrVal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function NewSpan(Const AttrVal : String) : TDomElement;
|
Function NewSpan(Const AttrVal : String) : TDomElement;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=CreateEl(Parent,'span');
|
Result:=CreateEl(Parent,'span');
|
||||||
Result['class']:=AttrVal;
|
Result['class']:=AttrVal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
GetMem(Line, Length(AText) * 3 + 4);
|
GetMem(Line, Length(AText) * 3 + 4);
|
||||||
Try
|
Try
|
||||||
@ -1406,10 +1406,10 @@ end;
|
|||||||
{ Returns the new CodeEl, which will be the old CodeEl in most cases }
|
{ Returns the new CodeEl, which will be the old CodeEl in most cases }
|
||||||
function THTMLWriter.AppendType(CodeEl, TableEl: TDOMElement;
|
function THTMLWriter.AppendType(CodeEl, TableEl: TDOMElement;
|
||||||
Element: TPasType; Expanded: Boolean; NestingLevel: Integer): TDOMElement;
|
Element: TPasType; Expanded: Boolean; NestingLevel: Integer): TDOMElement;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
S : String;
|
S : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := CodeEl;
|
Result := CodeEl;
|
||||||
|
|
||||||
@ -1424,7 +1424,7 @@ begin
|
|||||||
S:='array ';
|
S:='array ';
|
||||||
If (TPasArrayType(Element).IndexRange<>'') then
|
If (TPasArrayType(Element).IndexRange<>'') then
|
||||||
S:=S+'[' + TPasArrayType(Element).IndexRange + '] ';
|
S:=S+'[' + TPasArrayType(Element).IndexRange + '] ';
|
||||||
S:=S+'of ';
|
S:=S+'of ';
|
||||||
If (TPasArrayType(Element).ElType=Nil) then
|
If (TPasArrayType(Element).ElType=Nil) then
|
||||||
S:=S+'Const';
|
S:=S+'Const';
|
||||||
AppendPasSHFragment(CodeEl,S,0);
|
AppendPasSHFragment(CodeEl,S,0);
|
||||||
@ -1446,7 +1446,7 @@ begin
|
|||||||
Result := AppendRecordType(CodeEl, TableEl, TPasRecordType(Element), NestingLevel)
|
Result := AppendRecordType(CodeEl, TableEl, TPasRecordType(Element), NestingLevel)
|
||||||
else if (Element.ClassType = TPasFileType) and (TPasFileType(Element).elType=Nil) then
|
else if (Element.ClassType = TPasFileType) and (TPasFileType(Element).elType=Nil) then
|
||||||
AppendPasSHFragment(CodeEl,'file',0)
|
AppendPasSHFragment(CodeEl,'file',0)
|
||||||
else
|
else
|
||||||
// Other types
|
// Other types
|
||||||
AppendHyperlink(CodeEl, Element);
|
AppendHyperlink(CodeEl, Element);
|
||||||
end;
|
end;
|
||||||
@ -1650,7 +1650,7 @@ begin
|
|||||||
If Element.IsBitPacked then
|
If Element.IsBitPacked then
|
||||||
AppendKw(CodeEl, 'bitpacked record')
|
AppendKw(CodeEl, 'bitpacked record')
|
||||||
else
|
else
|
||||||
AppendKW(CodeEl, 'packed record')
|
AppendKW(CodeEl, 'packed record')
|
||||||
else
|
else
|
||||||
AppendKw(CodeEl, 'record');
|
AppendKw(CodeEl, 'record');
|
||||||
|
|
||||||
@ -1876,7 +1876,7 @@ begin
|
|||||||
ConvertBaseShortList(AElement, El, True)
|
ConvertBaseShortList(AElement, El, True)
|
||||||
Finally
|
Finally
|
||||||
PopOutputNode;
|
PopOutputNode;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
AppendText(NewEl,El['id']);
|
AppendText(NewEl,El['id']);
|
||||||
@ -1906,7 +1906,7 @@ var
|
|||||||
// TableEl, El, TREl, TDEl, ParaEl, NewEl, DescrEl: TDOMElement;
|
// TableEl, El, TREl, TDEl, ParaEl, NewEl, DescrEl: TDOMElement;
|
||||||
fn,s: String;
|
fn,s: String;
|
||||||
f: Text;
|
f: Text;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not (Assigned(DocNode) and Assigned(DocNode.FirstExample)) then
|
if not (Assigned(DocNode) and Assigned(DocNode.FirstExample)) then
|
||||||
Exit;
|
Exit;
|
||||||
@ -2010,7 +2010,7 @@ var
|
|||||||
begin
|
begin
|
||||||
CurDirectory := Allocator.GetFilename(AElement, ASubpageIndex);
|
CurDirectory := Allocator.GetFilename(AElement, ASubpageIndex);
|
||||||
i := Length(CurDirectory);
|
i := Length(CurDirectory);
|
||||||
while (i > 0) and not (CurDirectory[i] in DirSeparators) do
|
while (i > 0) and not (CurDirectory[i] in AllowDirectorySeparators) do
|
||||||
Dec(i);
|
Dec(i);
|
||||||
CurDirectory := Copy(CurDirectory, 1, i);
|
CurDirectory := Copy(CurDirectory, 1, i);
|
||||||
BaseDirectory := Allocator.GetRelativePathToTop(AElement);
|
BaseDirectory := Allocator.GetRelativePathToTop(AElement);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user