[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 23/37: [afmtodit]: Fix code style nits.
From: |
G. Branden Robinson |
Subject: |
[groff] 23/37: [afmtodit]: Fix code style nits. |
Date: |
Mon, 14 Mar 2022 01:59:10 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit ff2a3f98eae3b6fe42716c94d96fbe830dc11165
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 9 12:14:22 2022 +1100
[afmtodit]: Fix code style nits.
* src/utils/afmtodit/afmtodit.pl: Fix code style nits. Migrate to the
shebang line style we use in more recently modified Perl scripts.
Replace `-w` with 'use warnings;`. Shorten an output comment since
the groff version string can grow long (see commit 1264531310, 14
January 2014).
Also wrap some long lines. Add editor aid comments.
---
ChangeLog | 8 ++++++++
src/utils/afmtodit/afmtodit.pl | 18 ++++++++++++------
2 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1b381794..951c6f9e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-03-09 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/utils/afmtodit/afmtodit.pl: Fix code style nits. Migrate
+ to the shebang line style we use in more recently modified Perl
+ scripts. Replace `-w` with 'use warnings;`. Shorten an output
+ comment since the groff version string can grow long (see commit
+ 1264531310, 14 January 2014).
+
2022-03-09 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/utils/afmtodit/afmtodit.pl: Stop writing full file name to
diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl
index afaabc21..22e586e5 100644
--- a/src/utils/afmtodit/afmtodit.pl
+++ b/src/utils/afmtodit/afmtodit.pl
@@ -1,4 +1,4 @@
-#! /usr/bin/perl -w
+#! /usr/bin/env perl
# -*- Perl -*-
# Copyright (C) 1989-2020 Free Software Foundation, Inc.
# Written by James Clark (jjc@jclark.com)
@@ -10,14 +10,15 @@
# Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
-# groff is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# groff is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+use warnings;
use strict;
@afmtodit.tables@
@@ -421,7 +422,7 @@ foreach my $lig (sort keys %default_ligatures) {
open(FONT, ">$outfile") || die "$prog: can't open '$outfile' for output: $!\n";
select(FONT);
-print("# This file has been generated with " .
+print("# This file was generated with " .
"GNU afmtodit (groff) version @VERSION@\n");
print("#\n");
print("# $fullname\n") if defined $fullname;
@@ -596,7 +597,12 @@ for (my $i = 0; $i <= $#encoding; $i++) {
}
sub conv {
- $_[0]*$unitwidth*$resolution/(72*1000*$sizescale) + ($_[0] < 0 ? -.5 : .5);
+ $_[0]*$unitwidth*$resolution/(72*1000*$sizescale) +
+ ($_[0] < 0 ? -.5 : .5);
}
-# eof
+# Local Variables:
+# fill-column: 72
+# mode: CPerl
+# End:
+# vim: set cindent noexpandtab shiftwidth=2 softtabstop=2 textwidth=72:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 23/37: [afmtodit]: Fix code style nits.,
G. Branden Robinson <=