Forráskód Böngészése

* Patch from Reinier Olislagers to update copyright and emit a more friendly message if an input file is not found (bug ID 22639)

git-svn-id: trunk@22078 -
michael 13 éve
szülő
commit
4a9d012d3a
4 módosított fájl, 25 hozzáadás és 6 törlés
  1. 2 1
      utils/fpdoc/dglobals.pp
  2. 4 1
      utils/fpdoc/fpdoc.pp
  3. 18 3
      utils/fpdoc/makeskel.pp
  4. 1 1
      utils/fpdoc/testunit.xml

+ 2 - 1
utils/fpdoc/dglobals.pp

@@ -129,7 +129,8 @@ resourcestring
 
   STitle           = 'FPDoc - Free Pascal Documentation Tool';
   SVersion         = 'Version %s [%s]';
-  SCopyright       = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, [email protected]';
+  SCopyright1      = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, [email protected]';
+  SCopyright2      = '(c) 2005 - 2012 various FPC contributors';
 
   SCmdLineHelp     = 'Usage: %s [options]';
   SUsageOption010  = '--content         Create content file for package cross-references';

+ 4 - 1
utils/fpdoc/fpdoc.pp

@@ -3,6 +3,8 @@
     FPDoc  -  Free Pascal Documentation Tool
     Copyright (C) 2000 - 2003 by
       Areca Systems GmbH / Sebastian Guenther, [email protected]
+    2005-2012 by
+      various FPC contributors
 
     See the file COPYING, included in this distribution,
     for details about the copyright.
@@ -353,7 +355,8 @@ begin
 {$ENDIF}
   WriteLn(STitle);
   WriteLn(Format(SVersion, [DefFPCVersion, DefFPCDate]));
-  WriteLn(SCopyright);
+  WriteLn(SCopyright1);
+  WriteLn(SCopyright2);
   WriteLn;
   ParseCommandLine;
   if (FWriteProjectFile<>'') then

+ 18 - 3
utils/fpdoc/makeskel.pp

@@ -3,8 +3,13 @@
     FPDoc  -  Free Pascal Documentation Tool
     Copyright (C) 2000 - 2003 by
       Areca Systems GmbH / Sebastian Guenther, [email protected]
+    2005-2012 by
+      various FPC contributors
 
-    * Skeleton XML description file generator
+    * Skeleton XML description file generator.
+    This generator scans Pascal source code for identifiers and emits XML files
+    suitable for further processing with the fpdoc documentation system:
+    users can edit the XML file and add (help) description.
 
     See the file COPYING, included in this distribution,
     for details about the copyright.
@@ -28,7 +33,6 @@ uses
 resourcestring
   STitle = 'MakeSkel - FPDoc skeleton XML description file generator';
   SVersion = 'Version %s [%s]';
-  SCopyright = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, [email protected]';
   SCmdLineHelp = 'See documentation for usage.';
   SCmdLineInvalidOption = 'Ignoring unknown option "%s"';
   SNoPackageNameProvided = 'Please specify a package name with --package=<name>';
@@ -188,6 +192,14 @@ Var
 begin
   Result := AClass.Create(AName, AParent);
   Result.Visibility:=AVisibility;
+  // Let function/procedure arguments and function results
+  // inherit visibility from their parents if visDefault visibility is
+  // specified.
+  // This allows easier text searches on visibility in the resulting XML
+  if (AVisibility=visDefault) and
+    ((Result is TPasArgument) or (Result is TPasResultElement)) then
+    Result.Visibility:=AParent.Visibility;
+
   if AClass.InheritsFrom(TPasModule) then
     CurModule := TPasModule(Result);
   // Track this element
@@ -344,6 +356,8 @@ Var
   N : TDocNode;
      
 begin
+  if not(FileExists(AFileName)) then
+    raise Exception.CreateFmt('Cannot find source file %s to document.',[AFileName]);
   FNodeList:=TStringList.Create;
   Try
     FEmittedList:=TStringList.Create;
@@ -614,7 +628,8 @@ var
 begin
   WriteLn(STitle);
   WriteLn(Format(SVersion, [FPCVersion, FPCDate]));
-  WriteLn(SCopyright);
+  WriteLn(SCopyright1);
+  WriteLn(SCopyright2);
   InitOptions;
   Try
     E:=ParseCommandLine;

+ 1 - 1
utils/fpdoc/testunit.xml

@@ -488,7 +488,7 @@ Appears in 2.0
 
 <!-- function result Visibility: default -->
 <element name="OverloadedFunc.Result">
-<short></short>
+<short>Soso</short>
 </element>
 
 <!-- argument Visibility: default -->