| version 1.3, 2002/09/05 23:24:44 |
version 1.4, 2002/09/05 23:37:35 |
|
|
| last_tag = ""; |
last_tag = ""; |
| str = ""; |
str = ""; |
| desc = ""; |
desc = ""; |
| printf "# id-name\tfilename\tid-type\tdescription\n"; |
manpage = ""; |
| |
printf "# id-name\tfilename\tmanpage\tid-type\tdescription\n"; |
| |
} |
| |
|
| |
function remove_tag(s, reg) |
| |
{ |
| |
sub(/\t+/, " ", s); |
| |
reg1 = sprintf("^.*<%s[^>]*> *", reg); |
| |
reg2 = sprintf(" *</%s>.*$", reg); |
| |
if (!sub(reg1, "", s)) { s = ""; } |
| |
if (!sub(reg2, "", s)) { s = ""; } |
| |
|
| |
return s; |
| } |
} |
| |
|
| function compete_tag(reg) |
function compete_tag(reg) |
| Line 20 function compete_tag(reg) |
|
| Line 32 function compete_tag(reg) |
|
| # printf "AFTER = '%s'\n", str; |
# printf "AFTER = '%s'\n", str; |
| } |
} |
| if (str ~ reg && str ~ /id=['"]/ && desc == "") { |
if (str ~ reg && str ~ /id=['"]/ && desc == "") { |
| desc = str; |
desc = remove_tag(str, reg); |
| sub(/\t+/, " ", desc); |
|
| reg1 = sprintf("^.*<%s[^>]*> *", reg); |
|
| reg2 = sprintf(" *</%s>.*$", reg); |
|
| if (!sub(reg1, "", desc)) { desc = ""; } |
|
| if (!sub(reg2, "", desc)) { desc = ""; } |
|
| } |
} |
| |
|
| } |
} |
| |
|
| |
/<refentrytitle>/ { |
| |
manpage = remove_tag($0, "refentrytitle"); |
| |
} |
| |
|
| { |
{ |
| if (last_tag != "") { |
if (last_tag != "") { |
| str = sprintf("<%s %s", last_tag, $0); # join last notcompleted tag |
str = sprintf("<%s %s", last_tag, $0); # join last notcompleted tag |
| Line 59 function compete_tag(reg) |
|
| Line 70 function compete_tag(reg) |
|
| if (b[j] ~ /id=['"]/) { |
if (b[j] ~ /id=['"]/) { |
| sub(/^id=['"]/, "", b[j]); |
sub(/^id=['"]/, "", b[j]); |
| sub(/['"]$/, "", b[j]); |
sub(/['"]$/, "", b[j]); |
| printf "%s\t%s\t%s\t%s\n", b[j], FILENAME, b[1], desc; |
# In future manpage volume may be generated dynamicaly |
| |
printf "%s\t%s\t%s(3)\t%s\t%s\n", |
| |
b[j], FILENAME, manpage, b[1], desc; |
| desc = ""; |
desc = ""; |
| } |
} |
| } |
} |