diff options
author | 2021-03-01 23:21:24 +0000 | |
---|---|---|
committer | 2021-03-01 23:21:24 +0000 | |
commit | 9dc9117945367cf6711fd88c40d4a550ab91666e (patch) | |
tree | 14a5a18db8cf66a84269ad71cda0aab1f4147dac /gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm | |
parent | Fix merge issues, remove excess files - match perl-5.32.1 dist (diff) | |
download | wireguard-openbsd-9dc9117945367cf6711fd88c40d4a550ab91666e.tar.xz wireguard-openbsd-9dc9117945367cf6711fd88c40d4a550ab91666e.zip |
Apply local patches, remove excess files - perl-5.32.1
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm index bfcb5c40ee6..d8e42b1703b 100644 --- a/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm +++ b/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm @@ -144,7 +144,9 @@ sub _get_podman_switches { # # See RT #77465 # - #push @switches, 'utf8' => 1; + # Then again, do *not* comment it out on OpenBSD: + # mandoc handles UTF-8 input just fine. + push @switches, 'utf8' => 1; $self->debug( "Pod::Man switches are [@switches]\n" ); @@ -209,12 +211,6 @@ sub _have_groff_with_utf8 { $version ge $minimum_groff_version; } -sub _have_mandoc_with_utf8 { - my( $self ) = @_; - - $self->_is_mandoc and not system 'mandoc -Tlocale -V > /dev/null 2>&1'; - } - sub _collect_nroff_switches { my( $self ) = shift; @@ -227,6 +223,10 @@ sub _collect_nroff_switches { push @render_switches, '-rLL=' . (int $c) . 'n' if $cols > 80; } + if( $self->_is_mandoc ) { + push @render_switches, '-Owidth=' . $self->_get_columns; + } + # I hear persistent reports that adding a -c switch to $render # solves many people's problems. But I also hear that some mans # don't have a -c switch, so that unconditionally adding it here @@ -242,7 +242,6 @@ sub _get_device_switches { if( $self->_is_nroff ) { qw() } elsif( $self->_have_groff_with_utf8 ) { qw(-Kutf8 -Tutf8) } elsif( $self->_is_ebcdic ) { qw(-Tcp1047) } - elsif( $self->_have_mandoc_with_utf8 ) { qw(-Tlocale) } elsif( $self->_is_mandoc ) { qw() } else { qw(-Tlatin1) } } @@ -358,6 +357,9 @@ sub _filter_through_nroff { length $done ); + # wait for it to exit + waitpid( $pid, 0 ); + if( $? ) { $self->warn( "Error from pipe to $render!\n" ); $self->debug( 'Error: ' . do { local $/; <$err> } ); |