#!/usr/bin/perl

##Copyright, 2001, Astra Network Inc.  All Rights Reserved

##This source code has been published by Astra Network Inc. However, any
##use, reproduction, modification, distribution or transfer of this
##software, or any software which includes or is based upon any of this
##code, is only permitted if expressly authorized by a written license
##agreement from Astra. Contact your Astra representitive directly for
##more information.

@file = <>;
chomp @file;

$pcom = 0; # print comments

foreach (@file) {
	last if (not /Name:/i) and (not /^\/\//) and $pcom;
	next if (not /Name:/i) and (not (/^\/\// and $pcom));
	if (/^\/\//) {
		print;
		print "\n";
	} else {
		$name = $_;
		$name =~ s/Name: //i;
		$pcom = 1;
	}
}

$name = lc $name;

print "\n";
print "\t{\n";
print "\t\t\"",$name,"\",\n";
print "\t\t",$name,"_static_argtypes,\n";
print "\t\t",$name,"_dynamic_argtypes,\n";
print "\t\t",$name,"_module_init,\n";
print "\t\t",$name,"_module_inst,\n";
print "\t\t",$name,"_module_set,\n";
print "\t\t",$name,"_module_get,\n";
print "\t\t",$name,"_module_deinst,\n";
print "\t\t",$name,"_module_deinit,\n";
print "\t},\n"
