2
0
Эх сурвалжийг харах

--- Merging r39707 into '.':
U packages/chm/src/chmreader.pas
--- Recording mergeinfo for merge of r39707 into '.':
U .
--- Merging r39708 into '.':
U packages/chm/src/chmwriter.pas
U packages/chm/src/chmfilewriter.pas
--- Recording mergeinfo for merge of r39708 into '.':
G .
--- Merging r39743 into '.':
U rtl/objpas/sysutils/finah.inc
--- Recording mergeinfo for merge of r39743 into '.':
G .
--- Merging r39744 into '.':
U packages/fcl-image/src/fpimage.pp
--- Recording mergeinfo for merge of r39744 into '.':
G .
--- Merging r39784 into '.':
U utils/data2inc.exm
--- Recording mergeinfo for merge of r39784 into '.':
G .

# revisions: 39707,39708,39743,39744,39784

git-svn-id: branches/fixes_3_2@39790 -

marco 6 жил өмнө
parent
commit
36b61f985f

+ 1 - 1
.gitattributes

@@ -16880,7 +16880,7 @@ utils/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/README.txt svneol=native#text/plain
 utils/README.txt svneol=native#text/plain
 utils/bin2obj.pp svneol=native#text/plain
 utils/bin2obj.pp svneol=native#text/plain
 utils/creumap.pp svneol=native#text/plain
 utils/creumap.pp svneol=native#text/plain
-utils/data2inc.exm -text
+utils/data2inc.exm svneol=native#text/plain
 utils/data2inc.pp svneol=native#text/plain
 utils/data2inc.pp svneol=native#text/plain
 utils/debugsvr/Makefile svneol=native#text/plain
 utils/debugsvr/Makefile svneol=native#text/plain
 utils/debugsvr/Makefile.fpc svneol=native#text/plain
 utils/debugsvr/Makefile.fpc svneol=native#text/plain

+ 3 - 3
packages/chm/src/chmfilewriter.pas

@@ -180,9 +180,7 @@ begin
     Writer.AppendIndex(FIndexStream);
     Writer.AppendIndex(FIndexStream);
     if MakeBinaryIndex then
     if MakeBinaryIndex then
     begin
     begin
-      {$ifdef chmindex}
-        Writeln('into binindex ');
-      {$endif}
+      Error(chmnote,'CHM has binary index');      
       Writer.AppendBinaryIndexFromSiteMap(FIndex,False);
       Writer.AppendBinaryIndexFromSiteMap(FIndex,False);
     end;
     end;
   end;
   end;
@@ -191,6 +189,7 @@ begin
     Writer.AppendTOC(FTOCStream);
     Writer.AppendTOC(FTOCStream);
     if MakeBinaryTOC then
     if MakeBinaryTOC then
     begin
     begin
+      Error(chmnote,'CHM has binary toc');
       Writer.AppendBinaryTOCFromSiteMap(FToc);
       Writer.AppendBinaryTOCFromSiteMap(FToc);
     end;
     end;
   end;
   end;
@@ -1213,6 +1212,7 @@ begin
           FreeAndNil(FIndex);
           FreeAndNil(FIndex);
           FIndex:=TChmSiteMap.Create(stindex);
           FIndex:=TChmSiteMap.Create(stindex);
           FIndex.loadfromfile(FIndexFileName);
           FIndex.loadfromfile(FIndexFileName);
+          Error(chmnote,'Index items:'+inttostr(findex.Items.count));
         except
         except
           on e: Exception do
           on e: Exception do
             begin
             begin

+ 15 - 2
packages/chm/src/chmreader.pas

@@ -1012,6 +1012,7 @@ begin
   result:=head<tail;
   result:=head<tail;
 
 
   n:=head-oldhead;
   n:=head-oldhead;
+  if (n>0) and (oldhead[n-1]=0) then dec(n); // remove trailing #0
   setlength(ws,n div sizeof(widechar));
   setlength(ws,n div sizeof(widechar));
   move(oldhead^,ws[1],n);
   move(oldhead^,ws[1],n);
   for n:=1 to length(ws) do
   for n:=1 to length(ws) do
@@ -1077,6 +1078,15 @@ begin
    end;
    end;
 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);
 procedure parselistingblock(p:pbyte);
 var
 var
     itemstack:TObjectStack;
     itemstack:TObjectStack;
@@ -1189,8 +1199,11 @@ begin
               end;
               end;
           end;
           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
       inc(head,4); // always 1
       {$ifdef binindex}
       {$ifdef binindex}
         if head<tail then
         if head<tail then

+ 1 - 1
packages/chm/src/chmwriter.pas

@@ -2362,7 +2362,7 @@ begin
   IndexStream.Position:=0;
   IndexStream.Position:=0;
   IndexStream.write(hdr,sizeof(hdr));
   IndexStream.write(hdr,sizeof(hdr));
   {$ifdef binindex}
   {$ifdef binindex}
-    logentry('before append');
+    logentry('before append '+inttostr(indexstream.size));
   {$endif}
   {$endif}
 
 
   AppendBinaryIndexStream(IndexStream,datastream,MapStream,PropertyStream,chw);
   AppendBinaryIndexStream(IndexStream,datastream,MapStream,PropertyStream,chw);

+ 11 - 11
packages/fcl-image/src/fpimage.pp

@@ -31,7 +31,7 @@ type
   FPImageException = class (exception);
   FPImageException = class (exception);
 
 
   TFPColor = record
   TFPColor = record
-    red,green,blue,alpha : word;
+    Red,Green,Blue,Alpha : word;
   end;
   end;
   PFPColor = ^TFPColor;
   PFPColor = ^TFPColor;
 
 
@@ -125,8 +125,8 @@ type
                          PercentDone: Byte;  RedrawNow: Boolean; const R: TRect;
                          PercentDone: Byte;  RedrawNow: Boolean; const R: TRect;
                          const Msg: AnsiString; var Continue: Boolean); Virtual;
                          const Msg: AnsiString; var Continue: Boolean); Virtual;
     public
     public
-      constructor create (AWidth,AHeight:integer); virtual;
-      destructor destroy; override;
+      constructor Create (AWidth,AHeight:integer); virtual;
+      destructor Destroy; override;
       procedure Assign(Source: TPersistent); override;
       procedure Assign(Source: TPersistent); override;
       // Image handlers
       // Image handlers
       class function FindHandlerFromStream(Str:TStream): TIHData;
       class function FindHandlerFromStream(Str:TStream): TIHData;
@@ -184,8 +184,8 @@ type
       procedure SetInternalPixel (x,y:integer; Value:integer); override;
       procedure SetInternalPixel (x,y:integer; Value:integer); override;
       function GetInternalPixel (x,y:integer) : integer; override;
       function GetInternalPixel (x,y:integer) : integer; override;
     public
     public
-      constructor create (AWidth,AHeight:integer); override;
-      destructor destroy; override;
+      constructor Create (AWidth,AHeight:integer); override;
+      destructor Destroy; override;
       procedure SetSize (AWidth, AHeight : integer); override;
       procedure SetSize (AWidth, AHeight : integer); override;
   end;
   end;
 
 
@@ -397,7 +397,7 @@ Type
   end;
   end;
 
 
   TFPCompactImgGrayAlpha16BitValue = packed record
   TFPCompactImgGrayAlpha16BitValue = packed record
-    g,a: word;
+    G,A: word;
   end;
   end;
   PFPCompactImgGrayAlpha16BitValue = ^TFPCompactImgGrayAlpha16BitValue;
   PFPCompactImgGrayAlpha16BitValue = ^TFPCompactImgGrayAlpha16BitValue;
 
 
@@ -432,7 +432,7 @@ Type
   end;
   end;
 
 
   TFPCompactImgGrayAlpha8BitValue = packed record
   TFPCompactImgGrayAlpha8BitValue = packed record
-    g,a: byte;
+    G,A: byte;
   end;
   end;
   PFPCompactImgGrayAlpha8BitValue = ^TFPCompactImgGrayAlpha8BitValue;
   PFPCompactImgGrayAlpha8BitValue = ^TFPCompactImgGrayAlpha8BitValue;
 
 
@@ -452,7 +452,7 @@ Type
   end;
   end;
 
 
   TFPCompactImgRGBA8BitValue = packed record
   TFPCompactImgRGBA8BitValue = packed record
-    r,g,b,a: byte;
+    R,G,B,A: byte;
   end;
   end;
   PFPCompactImgRGBA8BitValue = ^TFPCompactImgRGBA8BitValue;
   PFPCompactImgRGBA8BitValue = ^TFPCompactImgRGBA8BitValue;
 
 
@@ -472,7 +472,7 @@ Type
   end;
   end;
 
 
   TFPCompactImgRGB8BitValue = packed record
   TFPCompactImgRGB8BitValue = packed record
-    r,g,b: byte;
+    R,G,B: byte;
   end;
   end;
   PFPCompactImgRGB8BitValue = ^TFPCompactImgRGB8BitValue;
   PFPCompactImgRGB8BitValue = ^TFPCompactImgRGB8BitValue;
 
 
@@ -492,7 +492,7 @@ Type
   end;
   end;
 
 
   TFPCompactImgRGB16BitValue = packed record
   TFPCompactImgRGB16BitValue = packed record
-    r,g,b: word;
+    R,G,B: word;
   end;
   end;
   PFPCompactImgRGB16BitValue = ^TFPCompactImgRGB16BitValue;
   PFPCompactImgRGB16BitValue = ^TFPCompactImgRGB16BitValue;
 
 
@@ -562,7 +562,7 @@ FuzzyDepth: word = 4): TFPCustomImage;
 
 
 function TryHtmlToFPColor(const S: String; out FPColor: TFPColor): Boolean;
 function TryHtmlToFPColor(const S: String; out FPColor: TFPColor): Boolean;
 function HtmlToFPColorDef(const S: String; out FPColor: TFpColor; Def: TFPColor): TFPColor;
 function HtmlToFPColorDef(const S: String; out FPColor: TFpColor; Def: TFPColor): TFPColor;
-function HtmlToFpColor(const S: String): TFPColor;
+function HtmlToFPColor(const S: String): TFPColor;
 
 
 
 
 implementation
 implementation

+ 1 - 1
rtl/objpas/sysutils/finah.inc

@@ -29,7 +29,7 @@ function ExtractShortPathName(Const FileName : PathStr) : PathStr;
 function ExpandFileName (Const FileName : PathStr): PathStr;
 function ExpandFileName (Const FileName : PathStr): PathStr;
 function ExpandFileNameCase (const FileName: PathStr; out MatchFound: TFilenameCaseMatch): PathStr;
 function ExpandFileNameCase (const FileName: PathStr; out MatchFound: TFilenameCaseMatch): PathStr;
 function ExpandUNCFileName (Const FileName : PathStr): PathStr;
 function ExpandUNCFileName (Const FileName : PathStr): PathStr;
-function ExtractRelativepath (Const BaseName,DestNAme : PathStr): PathStr;
+function ExtractRelativePath (Const BaseName,DestNAme : PathStr): PathStr;
 function IncludeTrailingPathDelimiter(Const Path : PathStr) : PathStr;
 function IncludeTrailingPathDelimiter(Const Path : PathStr) : PathStr;
 function IncludeTrailingBackslash(Const Path : PathStr) : PathStr;
 function IncludeTrailingBackslash(Const Path : PathStr) : PathStr;
 function ExcludeTrailingBackslash(Const Path: PathStr): PathStr;
 function ExcludeTrailingBackslash(Const Path: PathStr): PathStr;