summaryrefslogtreecommitdiff
path: root/nss/lib/ckfw/builtins/certdata.perl
diff options
context:
space:
mode:
Diffstat (limited to 'nss/lib/ckfw/builtins/certdata.perl')
-rw-r--r--nss/lib/ckfw/builtins/certdata.perl12
1 files changed, 12 insertions, 0 deletions
diff --git a/nss/lib/ckfw/builtins/certdata.perl b/nss/lib/ckfw/builtins/certdata.perl
index e77decf..502dfb0 100644
--- a/nss/lib/ckfw/builtins/certdata.perl
+++ b/nss/lib/ckfw/builtins/certdata.perl
@@ -14,6 +14,18 @@ my @objsize;
$constants{CK_TRUE} = "static const CK_BBOOL ck_true = CK_TRUE;\n";
$constants{CK_FALSE} = "static const CK_BBOOL ck_false = CK_FALSE;\n";
+if( scalar @ARGV == 0 ) {
+ print STDERR "Usage: $0 <input-file> [output-file]\n";
+ exit 1;
+}
+
+open(STDIN, '<', $ARGV[0])
+ or die "Could not open input file '$ARGV[0]' $!";
+if( scalar @ARGV > 1 ) {
+ open(STDOUT, '>', $ARGV[1])
+ or die "Could not open output file '$ARGV[1]' $!";
+}
+
while(<>) {
my @fields = ();
my $size;