# $Id$ # $Name$ use strict; use diagnostics; my $inputfile ="$ENV{srcdir}/../include/gom.h"; my $outputfile ="gomxref.html"; my $ext_link = "interface.html"; my $generated = ""; my $main_structs = ""; my $sub_structs=""; my $index = ""; my $section = ""; open INPUT, $inputfile or die "Can't read $inputfile\n"; open OUTPUT, ">$outputfile" or die "Can't read $outputfile\n"; while () { $section = "sub" if m|/\* Sub-structures \*/|; $section = "main" if m|/\* Main structures \*/|; $section = "" if m|/\* Functions \*/|; $generated = $1 if m|/\* [\$]Id: (.*?) \$ \*/|; next if m|/\*|; if ($section ne "") { if (m|^struct (.*) \{|) { s|^struct (.*?) \{|struct $1 \{|; if ($section eq "main") { $index .= "
  • struct $1
    \n"; } } elsif (m|struct (.*?) \*|) { my $link = ""; my $structname = $1; if ($structname =~ /^(date|age|xref)_value$/) { $link = $ext_link; } s|struct (.*?) \*|struct $1 \*|; } if ($section eq "sub") { $sub_structs .= "$_"; } else { $main_structs .= "$_"; } } } print OUTPUT <<"END_OF_HTML"; Gedcom object model in C

    Gedcom object model in C

    This page provides a cross-reference of all objects in the Gedcom object model for C. The following links are fast links to the main structures in the Gedcom object model:

    Main structures

    $main_structs
    

    Sub-structures

    $sub_structs
    

    Generated from: $generated END_OF_HTML close OUTPUT; close INPUT;