1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00

More perl snacks; added macro:[] for #define'd values; api dom/scanner.h

This commit is contained in:
Jonas Fonseca 2006-01-09 14:06:47 +01:00 committed by Jonas Fonseca
parent 620730e642
commit 0e5853cae7
3 changed files with 13 additions and 2 deletions

View File

@ -172,6 +172,7 @@ $(HTML_DIR)/perl-hooks.html: $(top_srcdir)/contrib/perl/hooks.pl
#
DOM_API = \
$(top_srcdir)/src/dom/scanner.h \
$(top_srcdir)/src/dom/stack.h \
$(top_srcdir)/src/dom/sgml/parser.h

View File

@ -14,6 +14,9 @@ monospacedwords=\basciidoc\(1\)
[struct-inlinemacro]
<a id="{target}">struct {target}: {0}</a>
[macro-inlinemacro]
<a id="{target}">struct {target}: {0}</a>
[typedef-inlinemacro]
<a id="{target}">typedef {target}: {0}</a>

View File

@ -73,12 +73,15 @@ while (<>)
$title = "enum:$1" . "[$title]";
$idpath = "";
} elsif (/#define\s+(\w+)\s*{/) {
} elsif (/#define\s+(\w+)[(]/) {
$title = "func:$1" . "[$title]";
$idpath = "";
} elsif (/#define\s+(\w+)/) {
$title = "macro:$1" . "[$title]";
$idpath = "";
} else {
if (/typedef/) {
if (/.*\(\*(\w+)\)\(/) {
$title = "typedef:$1" . "[$title]";
@ -90,6 +93,10 @@ while (<>)
if (/.*[\s*](\w+)\(/) {
$title = "func:$1" . "[$title]";
$idpath = "";
} elsif (/.*\(\*(\w+)\)\(/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";
$indent = "\t";
} elsif (/[^=]*[\s*](\w+)[\[\s,:;]/) {
$body = "#newline#" . $title if not $body;
$title = "id:[$idpath$1]::";