#!/usr/bin/perl -w # $Id$ # $Name$ use strict; use diagnostics; my $inputfile ="$ENV{srcdir}/../include/gom.h"; my $outputfile ="gomxref.html"; my $ext_link = "interface.html"; 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 \*/|; next if m|/\*|; if ($section ne "") { if (m|^struct (.*) \{|) { s|^struct (.*?) \{|struct $1 \{|; if ($section eq "main") { $index .= "
\n";
print OUTPUT $main_structs;
print OUTPUT "
\n";
print OUTPUT "\n";
print OUTPUT $sub_structs;
print OUTPUT "
\n";
close OUTPUT;
close INPUT;