#!/usr/bin/perl -w
#
# Converting MOF-files to .mo-files, Step 4
#
# Author: Christian Schiller
# Date: 08/15/98
#
while (<>) {
/^public/ && last;
}
while(!eof()) {
/class\s+(\w+)Impl\s+/ && do { $basename = $1; };
$filename = "schiller/jmapi/cim/" . $basename . ".mo";
open (OUTPUT, ">$filename") || die "can't open $filename";
print OUTPUT <<HERE;
package schiller.jmapi.cim;
import schiller.jmapi.cim.*;
import java.io.*;
import java.net.*;
import java.util.*;
import java.rmi.*;
import java.math.BigInteger;
import jrb.java.util.*;
import sunw.admin.arm.manager.*;
import sunw.admin.arm.common.*;
HERE
print OUTPUT;
while (<>) {
/^public/ && last;
print OUTPUT;
}
close OUTPUT;
print STDERR "wrote $filename\n";
}