diff --git a/utils/fpdoc/dglobals.pp b/utils/fpdoc/dglobals.pp index 03fe487987..07e77d9aee 100644 --- a/utils/fpdoc/dglobals.pp +++ b/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, sg@freepascal.org'; + SCopyright1 = '(c) 2000 - 2003 Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org'; + SCopyright2 = '(c) 2005 - 2012 various FPC contributors'; SCmdLineHelp = 'Usage: %s [options]'; SUsageOption010 = '--content Create content file for package cross-references'; diff --git a/utils/fpdoc/fpdoc.pp b/utils/fpdoc/fpdoc.pp index f55d8422ea..f1859f6476 100644 --- a/utils/fpdoc/fpdoc.pp +++ b/utils/fpdoc/fpdoc.pp @@ -3,6 +3,8 @@ FPDoc - Free Pascal Documentation Tool Copyright (C) 2000 - 2003 by Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org + 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 diff --git a/utils/fpdoc/makeskel.pp b/utils/fpdoc/makeskel.pp index 46d76f2fd7..3495298920 100644 --- a/utils/fpdoc/makeskel.pp +++ b/utils/fpdoc/makeskel.pp @@ -3,8 +3,13 @@ FPDoc - Free Pascal Documentation Tool Copyright (C) 2000 - 2003 by Areca Systems GmbH / Sebastian Guenther, sg@freepascal.org + 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, sg@freepascal.org'; SCmdLineHelp = 'See documentation for usage.'; SCmdLineInvalidOption = 'Ignoring unknown option "%s"'; SNoPackageNameProvided = 'Please specify a package name with --package='; @@ -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; diff --git a/utils/fpdoc/testunit.xml b/utils/fpdoc/testunit.xml index b678276d04..6970c398eb 100644 --- a/utils/fpdoc/testunit.xml +++ b/utils/fpdoc/testunit.xml @@ -488,7 +488,7 @@ Appears in 2.0 - +Soso