Skip to content

Commit

Permalink
Use extracted refs, add debugging info
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Nov 14, 2016
1 parent b8f0297 commit 415b22f
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions bibget.pl
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/perl
#
# Extract used the bibliography elements into a single file
#
# Diomidis Spinellis, 2000, 2005
#
# $Id$
#

sub getcitation {
my($fname) = @_;
Expand All @@ -18,18 +11,18 @@ sub getcitation {
for my $c (@cites) {
$used{$c} = 1;
}
print STDERR "Found citation $1\n";
} elsif (/\\bibdata\{([^}]+)\}/) {
@refs = split(/,/, $1)
@refs = split(/,/, $1);
print STDERR "Read refs from ", join(' ', @refs), "\n";
} elsif (/\\\@input\{([^}]+)\}/) {
getcitation($1)
getcitation($1);
}
}
}

getcitation($ARGV[0]);

@refs = split(/,/, "macro,sec,mp,myart,struct,perl,classics,coderead,unix,various,haskell,rfc,ieeestd,isostd,mybooks,ddspubs");

while ($f = shift @refs) {
open(IN, "/dds/bib/$f.bib") || die "Unable to open /dds/bib/$f.bib: $!\n";
check: for (;;) {
Expand Down

0 comments on commit 415b22f

Please sign in to comment.