NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
misc/39121: man ascii is sub-optimal
Note: There was a bad value `doc-bug change-request' for the field
`Class'.
It was set to the default value of `sw-bug'.
>Number: 39121
>Category: misc
>Synopsis: man ascii shows illogically formatted output
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jul 09 23:50:00 +0000 2008
>Originator: mac%S.culver.net@localhost
>Release: NetBSD 3.0.1
>Organization:
>Environment:
System: NetBSD S.Culver.Net 3.0.1 NetBSD 3.0.1 (S) #0: Sun Jul 30 02:26:46 PDT
2006 mac%S.Culver.Net@localhost:/usr/obj/sys/arch/i386/compile/S i386
Architecture: i386
Machine: i386
>Description:
man ascii produces an illogically-formatted output; it's verbose and
hard to read.
>How-To-Repeat:
man ascii
>Fix:
Replace the man page with this:
nul 000 00 0 040 20 32 @ 100 40 64 ` 140 60 96
soh 001 01 1 ! 041 21 33 A 101 41 65 a 141 61 97
stx 002 02 2 " 042 22 34 B 102 42 66 b 142 62 98
etx 003 03 3 # 043 23 35 C 103 43 67 c 143 63 99
eot 004 04 4 $ 044 24 36 D 104 44 68 d 144 64 100
enq 005 05 5 % 045 25 37 E 105 45 69 e 145 65 101
ack 006 06 6 & 046 26 38 F 106 46 70 f 146 66 102
bel 007 07 7 ' 047 27 39 G 107 47 71 g 147 67 103
bs 010 08 8 ( 050 28 40 H 110 48 72 h 150 68 104
ht 011 09 9 ) 051 29 41 I 111 49 73 i 151 69 105
nl 012 0a 10 * 052 2a 42 J 112 4a 74 j 152 6a 106
vt 013 0b 11 + 053 2b 43 K 113 4b 75 k 153 6b 107
np 014 0c 12 , 054 2c 44 L 114 4c 76 l 154 6c 108
cr 015 0d 13 - 055 2d 45 M 115 4d 77 m 155 6d 109
so 016 0e 14 . 056 2e 46 N 116 4e 78 n 156 6e 110
si 017 0f 15 / 057 2f 47 O 117 4f 79 o 157 6f 111
dle 020 10 16 0 060 30 48 P 120 50 80 p 160 70 112
dc1 021 11 17 1 061 31 49 Q 121 51 81 q 161 71 113
dc2 022 12 18 2 062 32 50 R 122 52 82 r 162 72 114
dc3 023 13 19 3 063 33 51 S 123 53 83 s 163 73 115
dc4 024 14 20 4 064 34 52 T 124 54 84 t 164 74 116
nak 025 15 21 5 065 35 53 U 125 55 85 u 165 75 117
syn 026 16 22 6 066 36 54 V 126 56 86 v 166 76 118
etb 027 17 23 7 067 37 55 W 127 57 87 w 167 77 119
can 030 18 24 8 070 38 56 X 130 58 88 x 170 78 120
em 031 19 25 9 071 39 57 Y 131 59 89 y 171 79 121
sub 032 1a 26 : 072 3a 58 Z 132 5a 90 z 172 7a 122
esc 033 1b 27 ; 073 3b 59 [ 133 5b 91 { 173 7b 123
fs 034 1c 28 < 074 3c 60 \ 134 5c 92 | 174 7c 124
gs 035 1d 29 = 075 3d 61 ] 135 5d 93 } 175 7d 125
rs 036 1e 30 > 076 3e 62 ^ 136 5e 94 ~ 176 7e 126
us 037 1f 31 ? 077 3f 63 _ 137 5f 95 del 177 7f 127
which is generated with this Python program:
#!/usr/bin/env python
"""
Generate 'sane' ASCII table
Mike Cheponis 9 July 2008
"""
ch=['nul','soh','stx','etx','eot','enq','ack','bel','bs ','ht ',\
'nl ','vt ','np ','cr ','so ','si ','dle','dc1','dc2','dc3','dc4',\
'nak','syn','etb','can','em ','sub','esc','fs ','gs ','rs ','us ']
ch.extend( ['' for i in range(95)] ) # 32 control chars, 95 printables, and
ch.extend(['del']) # one last non-printable
def pp(i):
if ch[i]: # is this a non-printable?
print ch[i],
else:
print chr(i),
print "%03o %02x"%(i,i),
if i<95:
print "%2d "%i,
elif i == 95: # special case for del
print "%2d "%i,
else:
print "%3d"%i,
for i in range(32):
[pp(i+j*32) for j in range(4)]
print
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index