Diff for scripts/shell/docbook/db-html2man between version 1.14 and 1.15
| version 1.14, 2002/09/04 03:33:06 |
version 1.15, 2002/09/04 21:24:55 |
|
|
| # $Id$ |
# $Id$ |
| |
|
| function remove_lines(str) |
function remove_lines(str) |
| { |
{ # {{{ |
| while (getline) { |
while (getline) { |
| if (sub(str, "")) { print; break; } |
if (sub(str, "")) { print; break; } |
| } |
} |
| return; |
return; |
| } |
} # }}} |
| |
|
| function handle_man(str) |
function handle_man(str) |
| { |
{ # {{{ |
| n = split(str, a, "-->"); |
n = split(str, a, "-->"); |
| for (i = 1; i <= n; i++) { |
for (i = 1; i <= n; i++) { |
| #printf "a[%d] = '%s'\n", i, a[i]; |
#printf "a[%d] = '%s'\n", i, a[i]; |
| Line 24 function handle_man(str) |
|
| Line 24 function handle_man(str) |
|
| printf "%s -->", a[i]; |
printf "%s -->", a[i]; |
| else printf "%s", a[i]; |
else printf "%s", a[i]; |
| } |
} |
| } |
} # }}} |
| |
|
| function handle_multiline_man() |
function handle_multiline_man() |
| { |
{ # {{{ |
| while (getline) { |
while (getline) { |
| if ($0 ~ /^[ \t]*-->$/) break; |
if ($0 ~ /^[ \t]*-->$/) break; |
| print; |
print; |
| } |
} |
| return; |
return; |
| } |
} # }}} |
| |
|
| function handle_table(str) |
function handle_table(str) |
| { |
{ # {{{ |
| entries = 0; |
entries = 0; |
| |
|
| sub(/<table[^>]*>/, "<variablelist>"); |
sub(/<table[^>]*>/, "<variablelist>"); |
| Line 84 function handle_table(str) |
|
| Line 84 function handle_table(str) |
|
| |
|
| print; |
print; |
| } |
} |
| } |
} # }}} |
| |
|
| # multiline MAN: comment |
# multiline MAN: comment |
| /<!-- MAN:$/ { |
/<!-- MAN:$/ { |
| Line 114 function handle_table(str) |
|
| Line 114 function handle_table(str) |
|
| } |
} |
| |
|
| # vim: ft=awk cindent |
# vim: ft=awk cindent |
| |
# vim600: fdl=0 fdc=3 fdm=marker |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|