mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 19:29:35 +02:00
* improve seealso handling when reading back binindex with chmls
* avoid trailing zero chars when reading back binindex with chmls git-svn-id: trunk@39707 -
This commit is contained in:
parent
d8e483ddd4
commit
733559b633
@ -1016,6 +1016,7 @@ begin
|
||||
result:=head<tail;
|
||||
|
||||
n:=head-oldhead;
|
||||
if (n>0) and (oldhead[n-1]=0) then dec(n); // remove trailing #0
|
||||
setlength(ws,n div sizeof(widechar));
|
||||
move(oldhead^,ws[1],n);
|
||||
for n:=1 to length(ws) do
|
||||
@ -1081,6 +1082,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure createentryseealso(Name:ansistring;CharIndex:integer;seealso:ansistring);
|
||||
var litem : TChmSiteMapItem;
|
||||
begin
|
||||
item:=sitemap.items.NewItem;
|
||||
item.KeyWord:=name;
|
||||
item.SeeAlso:=seealso;
|
||||
end;
|
||||
|
||||
|
||||
procedure parselistingblock(p:pbyte);
|
||||
var
|
||||
itemstack:TObjectStack;
|
||||
@ -1193,8 +1203,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if nrpairs<>0 Then
|
||||
createentry(Name,CharIndex,Topic,Title);
|
||||
if isseealso>0 then
|
||||
createentryseealso(name,charindex,seealsostr)
|
||||
else
|
||||
if nrpairs<>0 Then
|
||||
createentry(Name,CharIndex,Topic,Title);
|
||||
inc(head,4); // always 1
|
||||
{$ifdef binindex}
|
||||
if head<tail then
|
||||
|
Loading…
Reference in New Issue
Block a user