X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=doc%2Fmake_gom_xref;h=5a380d1f0565a1ee34edf88917984ce7a5f0d275;hb=60282b9f2f1326231ea5019e239d00bdccd6608b;hp=fac7ebd1d3a01e195e7b51c5717c7a27a25e3758;hpb=1011ec146df8c34475878d5e614df2a3fcfe0f6f;p=gedcom-parse.git diff --git a/doc/make_gom_xref b/doc/make_gom_xref index fac7ebd..5a380d1 100755 --- a/doc/make_gom_xref +++ b/doc/make_gom_xref @@ -1,13 +1,14 @@ -#!/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"; +my $generated = ""; my $main_structs = ""; my $sub_structs=""; @@ -15,16 +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 \*/|; - 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") { @@ -41,34 +58,61 @@ while () } if ($section eq "sub") { - $sub_structs .= "$_"; + $sub_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } else { - $main_structs .= "$_"; + $main_structs .= "$_ " . gedcom_link($gedc_ref) . "\n"; } } } -print OUTPUT "

Gedcom object model in C

\n"; -print OUTPUT < + + + Gedcom object model in C + + + + +

Gedcom object model in C: Structures

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: -END_OF_TEXT -print OUTPUT "\n"; -print OUTPUT "\n"; -print OUTPUT "
\n"; -print OUTPUT "

Main structures

\n"; -print OUTPUT "
\n";
-print OUTPUT $main_structs;
-print OUTPUT "
\n"; -print OUTPUT "
\n"; -print OUTPUT "

Sub-structures

\n"; -print OUTPUT "
\n";
-print OUTPUT $sub_structs;
-print OUTPUT "
\n"; +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: + +

+
+ +

Main structures

+
+$main_structs
+
+
+

Sub-structures

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