8 my $inputfile ="$ENV{srcdir}/../include/gom.h";
9 my $outputfile ="gomxref.html";
10 my $ext_link = "interface.html";
12 my $main_structs = "";
17 open INPUT, $inputfile or die "Can't read $inputfile\n";
18 open OUTPUT, ">$outputfile" or die "Can't read $outputfile\n";
22 $section = "sub" if m|/\* Sub-structures \*/|;
23 $section = "main" if m|/\* Main structures \*/|;
24 $section = "" if m|/\* Functions \*/|;
28 if (m|^struct (.*) \{|) {
29 s|^struct (.*?) \{|<a name="$1"><B>struct $1</B></a> \{|;
30 if ($section eq "main") {
31 $index .= " <LI><a href=\"#$1\">struct $1</a><br>\n";
34 elsif (m|struct (.*?) \*|) {
37 if ($structname =~ /^(date|age|xref)_value$/) {
40 s|struct (.*?) \*|<a href="$link#$1">struct $1</a> \*|;
43 if ($section eq "sub") {
47 $main_structs .= "$_";
52 print OUTPUT "<center><h1>Gedcom object model in C</h1></center>\n";
53 print OUTPUT <<END_OF_TEXT;
54 This page provides a cross-reference of all objects in the Gedcom object
55 model for C. The following links are fast links to the main structures
56 in the Gedcom object model:
59 print OUTPUT "<UL>\n";
61 print OUTPUT "</UL>\n";
62 print OUTPUT "<hr>\n";
63 print OUTPUT "<h2>Main structures</h2>\n";
64 print OUTPUT "<CODE><PRE>\n";
65 print OUTPUT $main_structs;
66 print OUTPUT "</PRE></CODE>\n";
67 print OUTPUT "<hr>\n";
68 print OUTPUT "<h2>Sub-structures</h2>\n";
69 print OUTPUT "<CODE><PRE>\n";
70 print OUTPUT $sub_structs;
71 print OUTPUT "</PRE></CODE>\n";