From fc07fcf6d01732ab9e6ef9008345f85cf74271c3 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Fri, 1 Nov 2002 10:32:40 +0000 Subject: [PATCH] Generate links to the definitions in the Gedcom standard. --- doc/make_gom_xref | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/doc/make_gom_xref b/doc/make_gom_xref index f883208..e918a59 100755 --- a/doc/make_gom_xref +++ b/doc/make_gom_xref @@ -4,6 +4,7 @@ use strict; use diagnostics; +my $gedcom_ref_doc="http://www.gendex.com/gedcom55/55gcch2.htm"; my $inputfile ="$ENV{srcdir}/../include/gom.h"; my $outputfile ="gomxref.html"; my $ext_link = "interface.html"; @@ -17,15 +18,25 @@ my $section = ""; open INPUT, $inputfile or die "Can't read $inputfile\n"; open OUTPUT, ">$outputfile" or die "Can't read $outputfile\n"; +sub gedcom_link { + my ($sublink) = @_; + return "(?)"; +} + 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|/\*|; + my $gedc_ref = ""; + $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 "") { + chomp; + if (s|\s*/\* (.*?) \*/\s*$||) { + $gedc_ref = $1; + } if (m|^struct (.*) \{|) { s|^struct (.*?) \{|struct $1 \{|; if ($section eq "main") { @@ -43,9 +54,17 @@ while () if ($section eq "sub") { $sub_structs .= "$_"; + if ($gedc_ref) { + $sub_structs .= " " . gedcom_link($gedc_ref); + } + $sub_structs .= "\n"; } else { $main_structs .= "$_"; + if ($gedc_ref) { + $main_structs .= " " . gedcom_link($gedc_ref); + } + $main_structs .= "\n"; } } } @@ -55,13 +74,26 @@ 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: +model for C. The '(?)' links are links to the +Gedcom standard +giving the meaning of each field. +

+The following links are fast links to the +main structures in the Gedcom object model: