2003-11-04 09:35:31 -05:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
2009-05-17 14:44:04 -04:00
|
|
|
# This file is in the public domain, so clarified as of
|
|
|
|
|
# 2009-05-17 by Arthur David Olson.
|
2003-11-04 09:35:31 -05:00
|
|
|
|
2003-12-01 18:05:15 -05:00
|
|
|
# Tell groff not to emit SGR escape sequences (ANSI color escapes).
|
|
|
|
|
GROFF_NO_SGR=1
|
|
|
|
|
export GROFF_NO_SGR
|
|
|
|
|
|
|
|
|
|
echo ".am TH
|
|
|
|
|
.hy 0
|
2003-11-20 08:51:04 -05:00
|
|
|
.na
|
2003-12-01 18:05:15 -05:00
|
|
|
..
|
2003-12-02 08:54:18 -05:00
|
|
|
.rm }H
|
|
|
|
|
.rm }F" | nroff -man - ${1+"$@"} | perl -ne '
|
Don't abuse "`" to mean open quote.
This was appropriate before Unicode, where "`" and "'" often balanced
in visual output, but that's been obsolete for a while.
Overall, single-quote 'like this' instead of `like this', and
double-quote "like this" or (in typeset output) “like this”
instead of ``like this''. While we're at it, fix some glitches
with hyphens versus minus versus en dash versus em dash.
* Makefile ($(MANTXTS)): Use UTF-8 locale to produce *.txt output.
* checktab.awk, tzselect.ksh:
Quote 'like this' in diagnostics, instead of `like this'.
* date.1, newctime.3, newtzset.3, time2posix.3, zic.8 (q, lq, rq):
New macros. Use them for better double-quoting in output.
* workman.sh: Tell Perl that its stdin and stdout are UTF-8.
* NEWS: Document this.
2014-06-15 13:27:37 -07:00
|
|
|
binmode STDIN, '\'':encoding(utf8)'\'';
|
|
|
|
|
binmode STDOUT, '\'':encoding(utf8)'\'';
|
2003-11-20 08:51:04 -05:00
|
|
|
chomp;
|
|
|
|
|
s/.\010//g;
|
|
|
|
|
s/\s*$//;
|
|
|
|
|
if (/^$/) {
|
|
|
|
|
$sawblank = 1;
|
|
|
|
|
next;
|
|
|
|
|
} else {
|
|
|
|
|
if ($sawblank && $didprint) {
|
|
|
|
|
print "\n";
|
|
|
|
|
$sawblank = 0;
|
2003-11-04 09:35:31 -05:00
|
|
|
}
|
2003-11-20 08:51:04 -05:00
|
|
|
print "$_\n";
|
|
|
|
|
$didprint = 1;
|
|
|
|
|
}
|
2005-01-31 14:06:07 -05:00
|
|
|
'
|