[fpc-pascal] Submitted paszlib/zipper documentation & fpdoc stripper questions

Reinier Olislagers reinierolislagers at gmail.com
Tue Dec 18 16:29:49 CET 2012


Hi all,

Finally got my FPC zip/unzip unit documentation in shape and submitted it as
23508 [Patch] Zipper documentation

A long time ago, I mistakenly generated an fpdoc skeleton with private
members etc visible for that unit doc and started documenting.

I wrote this program to get rid again of all comments and empty elements:
https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/fpdocstripper.zip

Results snippets
Before:
      <!-- property Visibility: public -->
      <element name="TUnZipper.Files">
        <short>Files in zip file (deprecated)</short>
        <descr>List of files that should be compressed in the zip file.
Note: deprecated. Use Entries.AddFileEntry(FileName) or
Entries.AddFileEntries(List) instead. </descr>
        <seealso/>
      </element>
      <!-- property Visibility: public -->
      <element name="TUnZipper.Entries">
        <short/>
        <descr/>
        <seealso/>
      </element>
      <!-- class Visibility: default -->
      <element name="EZipError">
        <short>Exception specific to the zipper unit</short>
      </element>
    </module>
    <!-- zipper -->
  </package>
</fpdoc-descriptions>
After:
      <element name="TUnZipper.Files">
        <short>Files in zip file (deprecated)</short>
        <descr>List of files that should be compressed in the zip file.
Note: deprecated. Use Entries.AddFileEntry(FileName) or
Entries.AddFileEntries(List) instead. </descr>
      </element>
      <element name="EZipError">
        <short>Exception specific to the zipper unit</short>
      </element>
    </module>
  </package>
</fpdoc-descriptions>

Questions:
1. Is there perhaps an easier way of doing this, e.g. using the logic in
existing fpdoc code? I've looked at it but in the end it seemed much
quicker to use XML units directly
2. Please let me know suggestions for improvement... I'm not an XML guru
and I'm afraid the code is not that good. Looking forward to learn from
your comments.

Thanks,
Reinier



More information about the fpc-pascal mailing list