tools/reorder/missing-syms.pl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:3d634cf3c853
1 #!/usr/bin/perl -w
2 #
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 #
8 # List the missing symbols (or, do a set difference).
9 #
10
11 use 5.004;
12 use strict;
13 use Getopt::Long;
14
15 $::opt_help = 0;
16 $::opt_defined = "mozilla-bin.order";
17 GetOptions("help", "defined=s");
18
19 if ($::opt_help) {
20 die "usage: missing-syms.pl --defined=<file> <symlist>";
21 }
22
23 $::Defined = { };
24
25 open(DEFINED, "<$::opt_defined") || die "couldn't open defined symbol list $::opt_defined";
26 while (<DEFINED>) {
27 chomp;
28 $::Defined{$_} = 1;
29 }
30 close(DEFINED);
31
32 while (<>) {
33 chomp;
34 print "$_\n" unless ($::Defined{$_});
35 }
36

mercurial