X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;ds=inline;f=doc%2Fmake_gom_xref;h=5a380d1f0565a1ee34edf88917984ce7a5f0d275;hb=5b045164f4a11b1f4d709820e784e1ca77b61b3f;hp=ddaba8f5e521c7bf4e44147c4d549d95c198bbb8;hpb=560de49d23fd6020af9a466c1c3bf5c661a71da7;p=gedcom-parse.git diff --git a/doc/make_gom_xref b/doc/make_gom_xref index ddaba8f..5a380d1 100755 --- a/doc/make_gom_xref +++ b/doc/make_gom_xref @@ -1,10 +1,10 @@ -#!/usr/bin/perl -w # $Id$ # $Name$ 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"; @@ -16,17 +16,32 @@ my $index = ""; my $section = ""; open INPUT, $inputfile or die "Can't read $inputfile\n"; -open OUTPUT, ">$outputfile" or die "Can't read $outputfile\n"; +open OUTPUT, ">$outputfile" or die "Can't write $outputfile\n"; + +sub gedcom_link { + my ($sublink) = @_; + if ($sublink) { + return "(?)"; + } + else { + 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,10 +58,10 @@ while () } if ($section eq "sub") { - $sub_structs .= "$_"; + $sub_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } else { - $main_structs .= "$_"; + $main_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } } } @@ -56,13 +71,26 @@ print OUTPUT <<"END_OF_HTML";
+The following links are fast links to the +main structures in the Gedcom object model: