summaryrefslogtreecommitdiff
path: root/prepdoc
blob: 6d829cb84a34cb0ae8ba0f6674a1ba7632b056bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# Produces documentation for gdbload/gdbdump. Works on Solaris 2.3.

# Calls nroff with an almost suitable device parameter (the best I can find)
# and then # postprocesses the result to remove the Bold/Italic escape
# sequences and the \n characters (which are inserted only sometimes).
#
# Additionally, percent signs are changed into backslashes, as the
# nroff I use can't be persuaded into accepting backslashes in macro
# parameters.

nroff -man -TX $1 | sed 's/.//g
s/
//g
s/%/\\/g
'