7 my ($inputfile) = @ARGV;
9 my $gedcom_ref_doc="http://www.gendex.com/gedcom55/55gcch2.htm";
10 my $outputfile ="gomxref.html";
11 my $ext_link = "interface.html";
14 my $main_structs = "";
19 open INPUT, $inputfile or die "Can't read $inputfile\n";
20 open OUTPUT, ">$outputfile" or die "Can't write $outputfile\n";
25 return "(<A href=\"javascript:popup_gedcom('$sublink')\">?</A>)";
35 $section = "sub" if m|^/\* Sub-structures \*/|;
36 $section = "main" if m|^/\* Main structures \*/|;
37 $section = "" if m|^/\* Functions \*/|;
38 $generated = $1 if m|^/\* [\$]Id: (.*?) \$ \*/|;
43 if (s|\s*/\* (.*?) \*/\s*$||) {
46 if (m|^struct (.*) \{|) {
47 s|^struct (.*?) \{|<a name="$1"><B>struct $1</B></a> \{|;
48 if ($section eq "main") {
49 $index .= " <LI><a href=\"#$1\">struct $1</a><br>\n";
52 elsif (m|struct (.*?) \*|) {
55 if ($structname =~ /^(date|age|xref)_value$/) {
58 s|struct (.*?) \*|<a href="$link#$1">struct $1</a> \*|;
61 if ($section eq "sub") {
62 $sub_structs .= "$_ " . gedcom_link($gedc_ref) . "\n";
65 $main_structs .= "$_ " . gedcom_link($gedc_ref) . "\n";
70 print OUTPUT <<"END_OF_HTML";
71 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN">
74 <title>Gedcom object model in C</title>
75 <script language="JavaScript" type="text/javascript">
77 function popup_gedcom(sublink) {
78 Gedcom = window.open( '$gedcom_ref_doc' + '#' + sublink,
80 'scrollbars=yes,resizable=yes,toolbar=no,height=400, width=400');
85 <body bgcolor="White">
87 <h1 align="center">Gedcom object model in C: Structures</h1>
88 This page provides a cross-reference of all objects in the Gedcom object
89 model for C. The '(?)' links are links to the
90 <a href="http://www.gendex.com/gedcom55/55gctoc.htm">Gedcom standard</a>
91 giving the meaning of each field.
93 The following links are fast links to the
94 main structures in the Gedcom object model:
101 <h2>Main structures</h2>
107 <h2>Sub-structures</h2>
113 <SMALL>Generated from: $generated</SMALL>