groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: Further tweak shell script portability in the hdtbl fonts


From: Ingo Schwarze
Subject: [groff] 01/01: Further tweak shell script portability in the hdtbl fonts examples.
Date: Mon, 10 Dec 2018 11:41:19 -0500 (EST)

schwarze pushed a commit to branch master
in repository groff.

commit 33b5f7d7cccee9d38cc512e81f1e198ccdc8dfdf
Author: Ingo Schwarze <address@hidden>
Date:   Mon Dec 10 17:24:13 2018 +0100

    Further tweak shell script portability in the hdtbl fonts examples.
    
    As gbranden@ rightly observed, the number of characters in the
    character class :cntrl: is locale-dependent, POSIX says that the
    repeat count in the second argument to tr can be omitted, and the
    transliteration target will grow to fit the size of the source.
    This actually works on OpenBSD, Debian Jessie, Solaris 11, and
    Solaris 9, so it seems quite portable indeed.
    
    People keep discussing all kinds of fancy changes on the mailing
    list, but fail to address the question of which is the minimal
    change required to get portable behaviour during the last minute
    before release.  Thus, i'm just making a decision and using the
    minimal tweak suggested by address@hidden
---
 contrib/hdtbl/examples/fonts_n.in | 2 +-
 contrib/hdtbl/examples/fonts_x.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/hdtbl/examples/fonts_n.in 
b/contrib/hdtbl/examples/fonts_n.in
index 72b5d2f..76d6661 100644
--- a/contrib/hdtbl/examples/fonts_n.in
+++ b/contrib/hdtbl/examples/fonts_n.in
@@ -54,7 +54,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .  pso sh -c \
        "printf '%s' '.ds *f ' ; \
         ls \\*[fontpath]/dev\*[.T] \
-        | tr '[:cntrl:]' '[ *32]'"
+        | tr '[:cntrl:]' '[ *]'"
 .  \"  This dummy line is necessary; the preceding line eats it.
 .
 .  while !"\\*[*args]"" \{\
diff --git a/contrib/hdtbl/examples/fonts_x.in 
b/contrib/hdtbl/examples/fonts_x.in
index a4f2eab..081c8c7 100644
--- a/contrib/hdtbl/examples/fonts_x.in
+++ b/contrib/hdtbl/examples/fonts_x.in
@@ -54,7 +54,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .  pso sh -c \
        "printf '%s' '.ds *f ' ; \
         ls \\*[fontpath]/dev\*[.T] \
-        | tr '[:cntrl:]' '[ *32]'"
+        | tr '[:cntrl:]' '[ *]'"
 .  \"  This dummy line is necessary; the preceding line eats it.
 .
 .  while !"\\*[*args]"" \{\



reply via email to

[Prev in Thread] Current Thread [Next in Thread]