Add error checking to obj_xref.pl and add command line support for data
file locations.
This commit is contained in:
@@ -47,7 +47,7 @@ obj_mac.h: objects.pl objects.txt obj_mac.num
|
||||
@sleep 1; touch obj_mac.h; sleep 1
|
||||
|
||||
obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
|
||||
$(PERL) objxref.pl > obj_xref.h
|
||||
$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
|
||||
@sleep 1; touch obj_xref.h; sleep 1
|
||||
|
||||
files:
|
||||
|
@@ -1,6 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
|
||||
open IN, "obj_mac.num";
|
||||
use strict;
|
||||
|
||||
my %xref_tbl;
|
||||
my %oid_tbl;
|
||||
|
||||
my ($mac_file, $xref_file) = @ARGV;
|
||||
|
||||
open(IN, $mac_file) || die "Can't open $mac_file";
|
||||
|
||||
# Read in OID nid values for a lookup table.
|
||||
|
||||
@@ -12,7 +19,7 @@ while (<IN>)
|
||||
}
|
||||
close IN;
|
||||
|
||||
open IN, "obj_xref.txt";
|
||||
open(IN, $xref_file) || die "Can't open $xref_file";
|
||||
|
||||
my $ln = 1;
|
||||
|
||||
|
Reference in New Issue
Block a user