OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [tk2html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/bin/sh
2
# filter to convert Tk and Tcl man pages to html equivalents
3
# does not do any linking !!!!
4
 
5
TOP=`pwd`
6
if [ $# -eq 0 ] ; then
7
    echo "Usage $0 filename"
8
    exit
9
fi
10
 
11
cat  $1 |
12
    sed  -e 's/\\-/-/g' \
13
         -e 's/\\[0&]/  /g' \
14
         -e 's/&/\&/g' \
15
         -e 's/
16
         -e 's/>/\>/g' \
17
         -e 's/\\|//g' \
18
         -e 's/\\e/\\/g'     |
19
    /usr/bin/nawk -f ${TOP}/tk2html.awk |
20
     sed -e 's^\\fB\([^\\]*\)\\fR^\1^g' \
21
        -e 's^\\fI\(.[^\\]*\)\\fR^\1^g' \
22
        -e 's^\\fB^^g' \
23
        -e 's^\\fI^^g' \
24
        -e 's^\\f[RP]^^g' \
25
        -e 's/^.[LP]P/

/' \

26
        -e 's/^.br/
/' \
27
        -e 's/^\.DS.*/
/' \
28
        -e 's$^\.DE.*$
$' \
29
        -e 's/^\.nf *//' \
30
        -e 's$^\.fi *$
$' \
31
        -e 's$^\.BE *$

$' \
32
        -e 's/^\.RS.*/
    /' \
33
        -e 's$^\.RE.*$$' \
34
        -e 's^\.SH *"*\([^"]*\)"*^

\1

^' \
35
        -e 's/^\.[a-zA-Z]*.*//' \
36
        -e 's/^`\\\".*//' |
37
    /usr/bin/nawk -f ${TOP}/tk2html2.awk
38
 
39
# The above handling for font mapping to html works correctly in about 95% of
40
# the cases, the others turn out stacking the font setting so you get the
41
# font bleeding since it isn't being turned # off in the correct places.
42
# To correct we would have to record the current ( non-default) font and
43
# explicitly turn it off when another font change is detected.
44
# Which would make multiple styles impossible concurrently which seems to
45
# be the case anyway....
46
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.