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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [insight/] [itcl/] [iwidgets3.0.0/] [doc/] [tk2html2.awk] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
#!/bin/nawk
2
# cleans up any leading crap before <TITLE> line in stream from tk2html
3
 
4
/^<TITLE>/ { go = 1 }
5
 
6
/^<table>*/ {
7
        getline ln
8
        numf = split (ln, spln)
9
 
10
        if ( ln !~ "Name: *" )
11
        {
12
            ind = 0
13
            inc = 4
14
            print "<table cellpadding=5>"
15
 
16
            while ( ln !~ "^</table>" )
17
            {
18
                for (i = 1; i <= numf; i++)
19
                {
20
                    tablns[ind] = spln[i]
21
                    ind++
22
                }
23
                getline ln
24
                numf = split (ln, spln)
25
            }
26
 
27
            for (i = 0; i < inc; i++)
28
                {
29
                    print "<td valign=top>"
30
                    for (j = i; j < ind; j += inc)
31
                        print tablns[j] "<br>"
32
                    print "</td>"
33
                }
34
 
35
            print "</table>"
36
        }
37
 
38
        else
39
        {
40
            print "<pre>"
41
            while ( ln !~ "^</table>" )
42
            {
43
                print ln
44
                getline ln
45
            }
46
            print "</pre>"
47
        }
48
 
49
        next
50
    }
51
 
52
go == 1 { print $0 }
53
 

powered by: WebSVN 2.1.0

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