libyal / libpff

Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format
GNU Lesser General Public License v3.0
286 stars 74 forks source link

patch for manpage warnings #72

Closed rhash closed 4 years ago

rhash commented 5 years ago

Hello,

here are two patches from libpff Debian package to fix man warnings in the manpages.

  1. fix-man-pages-pffexport-and-pffinfo.patch.gz
  2. fixes-for-libpff-manpage.patch.gz

Please apply the patches, since the Debian Lintian tool treats man warnings as errors.

The second patch reduces multiple man warnings to the warning "can't break line".

One can test a manpage (e.g. libpff.3) for warnings using the following command:

     LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 \
            man --warnings -E UTF-8 -l -Tutf8 -Z libpff.3 >/dev/null

Thanks

joachimmetz commented 5 years ago

Thx for the patch, I'll have a look when time permits to integrate the proposed changes.

joachimmetz commented 5 years ago

Updated libpff.3 manpage, added tests to validate manpages using the proposed method. https://github.com/libyal/libpff/commit/8d82a689417abe9c9aa272fd7782faea8c542393

joachimmetz commented 5 years ago

https://lintian.debian.org/tags/manpage-has-errors-from-man.html

joachimmetz commented 5 years ago

Still some issues:

     int
     libpff_file_get_root_item(libpff_file_t *file, libpff_item_t **root_item,
<standard input>:134: warning [p 4, 5.0i]: can't break line
<standard input>:136: warning [p 4, 5.7i]: can't break line
<standard input>:138: warning [p 4, 6.3i]: can't break line
         libpff_error_t **error);
joachimmetz commented 5 years ago

https://www.gnu.org/software/groff/manual/html_node/Manipulating-Filling-and-Adjusting.html https://www.gnu.org/software/groff/manual/html_node/Manipulating-Hyphenation.html

Note to self have a look at https://manpages.debian.org/testing/groff/groff_mdoc.7.en.html#Functions_(Library_Routines)

This does not solve the issue, warning persist.

joachimmetz commented 5 years ago

Consider not using .Ft and .Fn e.g.

+Available when compiled with libbfio support:
+.br
+\fIint\fP \fBlibpff_check_file_signature_file_io_handle\fP(\fIlibbfio_handle_t *file_io_handle\fP, \fIlibpff_error_t *error\fP);
+.Pp
joachimmetz commented 5 years ago

@rhash any idea/context on why man/groff is still complaining about can't break line?

joachimmetz commented 5 years ago

Regarding fix-man-pages-pffexport-and-pffinfo.patch.gz it looks like .Ar source might be a better replacement.

https://www.freebsd.org/cgi/man.cgi?query=mdoc.samples