Index: trunk/doc/developer/lihata_board/render/html.awk =================================================================== --- trunk/doc/developer/lihata_board/render/html.awk (nonexistent) +++ trunk/doc/developer/lihata_board/render/html.awk (revision 16840) @@ -0,0 +1,154 @@ +function tbl_hdr(node, level) +{ + print "
" +# print qstrip(DATA[path "/desc"]) + print "
" + print "
type | description" + + v = children(N, path) + for(n = 1; n <= v; n++) { + node = N[n] + print " |
---|---|
" NAME[node] + print " | " qstripnl(DATA[node]) + } + print " |
Each table below describes the full tree of one of the pcb-rnd file formats, from the root." + gen_roots("/lht_tree_doc/roots") + + print "
Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." + gen_roots("/lht_tree_doc/comm") + + print "
" + gen_types("/lht_tree_doc/types") +} Index: trunk/doc/developer/lihata_board/render/lht.awk =================================================================== --- trunk/doc/developer/lihata_board/render/lht.awk (nonexistent) +++ trunk/doc/developer/lihata_board/render/lht.awk (revision 16840) @@ -0,0 +1,62 @@ +BEGIN { + q="\"" +} + +function parent(path) +{ + sub("/[^/]*$", "", path) + return path +} + +function children(DST, path) +{ + return split(CHILDREN[path], DST, "[|]") +} + +function sy_is_recursive(path, dp) +{ + dp = DATA[path] + gsub("/[0-9]::", "/", path) + if (path ~ dp) + rturn 1 + return 0 +} + +function sy_href(path) +{ + return "#" path +} + +(($1 == "open") || ($1 == "data")) { + path=$3 + gsub("[0-9]+::", "", path) + TYPE[path] = $2 + p = parent(path) + if (CHILDREN[p] == "") + CHILDREN[p] = path + else + CHILDREN[p] = CHILDREN[p] "|" path + data=$4 + gsub("\\\\057", "/", data) + DATA[path] = data + + name=$3 + sub("^.*/", "", name) + sub(".*::", "", name) + NAME[path] = name +} + +function qstrip(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", " ", s) + return s +} + +function qstripnl(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", "\n", s) + return s +} + Index: trunk/doc/developer/lihata_board/render/render.sh =================================================================== --- trunk/doc/developer/lihata_board/render/render.sh (revision 16839) +++ trunk/doc/developer/lihata_board/render/render.sh (revision 16840) @@ -8,226 +8,8 @@ for n in ../*.lht do lhtflat < $n -done | tee Flat | awk -F "[\t]" ' -BEGIN { - q="\"" -} +done | tee Flat | awk -F "[\t]" -f lht.awk -f html.awk -function parent(path) -{ - sub("/[^/]*$", "", path) - return path -} - -function children(DST, path) -{ - return split(CHILDREN[path], DST, "[|]") -} - -function sy_is_recursive(path, dp) -{ - dp = DATA[path] - gsub("/[0-9]::", "/", path) - if (path ~ dp) - rturn 1 - return 0 -} - -function sy_href(path) -{ - return "#" path -} - -(($1 == "open") || ($1 == "data")) { - path=$3 - gsub("[0-9]+::", "", path) - TYPE[path] = $2 - p = parent(path) - if (CHILDREN[p] == "") - CHILDREN[p] = path - else - CHILDREN[p] = CHILDREN[p] "|" path - data=$4 - gsub("\\\\057", "/", data) - DATA[path] = data - - name=$3 - sub("^.*/", "", name) - sub(".*::", "", name) - NAME[path] = name -} - -function qstrip(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", " ", s) - return s -} - -function qstripnl(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", "\n", s) - return s -} - -function tbl_hdr(node, level) -{ - print "
" -# print qstrip(DATA[path "/desc"]) - print "
" - print "
type | description" - - v = children(N, path) - for(n = 1; n <= v; n++) { - node = N[n] - print " |
---|---|
" NAME[node] - print " | " qstripnl(DATA[node]) - } - print " |
Each table below describes the full tree of one of the pcb-rnd file formats, from the root." - gen_roots("/lht_tree_doc/roots") - - print "
Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." - gen_roots("/lht_tree_doc/comm") - - print "
" - gen_types("/lht_tree_doc/types") -} - -' - echo '