equal
deleted
inserted
replaced
1 #!/usr/bin/env perl |
|
2 # $Id$ |
|
3 |
|
4 use strict; |
|
5 |
|
6 my %defs = (); |
|
7 my %refs = (); |
|
8 |
|
9 while (<ARGV>) { |
|
10 if (m,\\glossaryentry\{\w*\\bf *((\w|\s)+)@,) { |
|
11 $defs{lc $1} = 1; |
|
12 } |
|
13 while (m,\\seeglossary *\{((\w|\s)+)\},g) { |
|
14 $refs{lc $1} = 1; |
|
15 } |
|
16 } |
|
17 |
|
18 print "Glossary definitions:\n"; |
|
19 foreach (sort(keys(%defs))) { |
|
20 print " \"$_\"\n"; |
|
21 } |
|
22 |
|
23 foreach (keys(%refs)) { |
|
24 s,s$,,; |
|
25 if (!defined($defs{$_})) { |
|
26 print "### Undefined glossary reference: \"$_\"\n"; |
|
27 } |
|
28 } |
|