Deleted Added
full compact
mkerr.pl (68651) mkerr.pl (89837)
1#!/usr/local/bin/perl -w
2
3my $config = "crypto/err/openssl.ec";
4my $debug = 0;
5my $rebuild = 0;
6my $static = 1;
7my $recurse = 0;
8my $reindex = 0;

--- 39 unchanged lines hidden (view full) ---

48open(IN, "<$config") || die "Can't open config file $config";
49
50# Parse config file
51
52while(<IN>)
53{
54 if(/^L\s+(\S+)\s+(\S+)\s+(\S+)/) {
55 $hinc{$1} = $2;
1#!/usr/local/bin/perl -w
2
3my $config = "crypto/err/openssl.ec";
4my $debug = 0;
5my $rebuild = 0;
6my $static = 1;
7my $recurse = 0;
8my $reindex = 0;

--- 39 unchanged lines hidden (view full) ---

48open(IN, "<$config") || die "Can't open config file $config";
49
50# Parse config file
51
52while(<IN>)
53{
54 if(/^L\s+(\S+)\s+(\S+)\s+(\S+)/) {
55 $hinc{$1} = $2;
56 $libinc{$2} = $1;
56 $cskip{$3} = $1;
57 if($3 ne "NONE") {
58 $csrc{$1} = $3;
59 $fmax{$1} = 99;
60 $rmax{$1} = 99;
61 $fnew{$1} = 0;
62 $rnew{$1} = 0;
63 }

--- 5 unchanged lines hidden (view full) ---

69 }
70}
71
72close IN;
73
74# Scan each header file in turn and make a list of error codes
75# and function names
76
57 $cskip{$3} = $1;
58 if($3 ne "NONE") {
59 $csrc{$1} = $3;
60 $fmax{$1} = 99;
61 $rmax{$1} = 99;
62 $fnew{$1} = 0;
63 $rnew{$1} = 0;
64 }

--- 5 unchanged lines hidden (view full) ---

70 }
71}
72
73close IN;
74
75# Scan each header file in turn and make a list of error codes
76# and function names
77
77while (($lib, $hdr) = each %hinc)
78while (($hdr, $lib) = each %libinc)
78{
79 next if($hdr eq "NONE");
80 print STDERR "Scanning header file $hdr\n" if $debug;
81 open(IN, "<$hdr") || die "Can't open Header file $hdr\n";
82 my $line = "", $def= "", $linenr = 0;
83 while(<IN>) {
84 $linenr++;
85 print STDERR "line: $linenr\r" if $debug;

--- 166 unchanged lines hidden (view full) ---

252 open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n";
253
254 print OUT @out;
255 undef @out;
256 print OUT <<"EOF";
257/* The following lines are auto generated by the script mkerr.pl. Any changes
258 * made after this point may be overwritten when the script is next run.
259 */
79{
80 next if($hdr eq "NONE");
81 print STDERR "Scanning header file $hdr\n" if $debug;
82 open(IN, "<$hdr") || die "Can't open Header file $hdr\n";
83 my $line = "", $def= "", $linenr = 0;
84 while(<IN>) {
85 $linenr++;
86 print STDERR "line: $linenr\r" if $debug;

--- 166 unchanged lines hidden (view full) ---

253 open (OUT, ">$hfile") || die "Can't Open File $hfile for writing\n";
254
255 print OUT @out;
256 undef @out;
257 print OUT <<"EOF";
258/* The following lines are auto generated by the script mkerr.pl. Any changes
259 * made after this point may be overwritten when the script is next run.
260 */
261void ERR_load_${lib}_strings(void);
260
261/* Error codes for the $lib functions. */
262
263/* Function codes. */
264EOF
265
266 foreach $i (@function) {
267 $z=6-int(length($i)/8);

--- 15 unchanged lines hidden (view full) ---

283 printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z;
284 }
285 print OUT <<"EOF";
286
287#ifdef __cplusplus
288}
289#endif
290#endif
262
263/* Error codes for the $lib functions. */
264
265/* Function codes. */
266EOF
267
268 foreach $i (@function) {
269 $z=6-int(length($i)/8);

--- 15 unchanged lines hidden (view full) ---

285 printf OUT "#define $i%s $rcodes{$i}\n","\t" x $z;
286 }
287 print OUT <<"EOF";
288
289#ifdef __cplusplus
290}
291#endif
292#endif
291
292EOF
293 close OUT;
294
295 # Rewrite the C source file containing the error details.
296
297 # First, read any existing reason string definitions:
298 my %err_reason_strings;
299 if (open(IN,"<$cfile")) {

--- 230 unchanged lines hidden ---
293EOF
294 close OUT;
295
296 # Rewrite the C source file containing the error details.
297
298 # First, read any existing reason string definitions:
299 my %err_reason_strings;
300 if (open(IN,"<$cfile")) {

--- 230 unchanged lines hidden ---