Deleted Added
full compact
ck_errf.pl (1.1.1.3) ck_errf.pl (1.1.1.4)
1#!/usr/local/bin/perl
1#! /usr/bin/env perl
2# Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
2#
3#
4# Licensed under the OpenSSL license (the "License"). You may not use
5# this file except in compliance with the License. You can obtain a copy
6# in the file LICENSE in the source distribution or at
7# https://www.openssl.org/source/license.html
8
3# This is just a quick script to scan for cases where the 'error'
4# function name in a XXXerr() macro is wrong.
5#
6# Run in the top level by going
7# perl util/ck_errf.pl */*.c */*/*.c
8#
9
10my $err_strict = 0;

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

16 {
17 $err_strict = 1;
18 next;
19 }
20 open(IN,"<$file") || die "unable to open $file\n";
21 $func="";
22 while (<IN>)
23 {
9# This is just a quick script to scan for cases where the 'error'
10# function name in a XXXerr() macro is wrong.
11#
12# Run in the top level by going
13# perl util/ck_errf.pl */*.c */*/*.c
14#
15
16my $err_strict = 0;

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

22 {
23 $err_strict = 1;
24 next;
25 }
26 open(IN,"<$file") || die "unable to open $file\n";
27 $func="";
28 while (<IN>)
29 {
24 if (!/;$/ && /^\**([a-zA-Z].*[\s*])?([A-Za-z_0-9]+)\(.*([),]|$)/)
30 if (!/;$/ && /^\**([a-zA-Z_].*[\s*])?([A-Za-z_0-9]+)\(.*([),]|$)/)
25 {
26 /^([^()]*(\([^()]*\)[^()]*)*)\(/;
27 $1 =~ /([A-Za-z_0-9]*)$/;
28 $func = $1;
29 $func =~ tr/A-Z/a-z/;
30 }
31 if (/([A-Z0-9]+)err\(([^,]+)/ && ! /ckerr_ignore/)
32 {

--- 32 unchanged lines hidden ---
31 {
32 /^([^()]*(\([^()]*\)[^()]*)*)\(/;
33 $1 =~ /([A-Za-z_0-9]*)$/;
34 $func = $1;
35 $func =~ tr/A-Z/a-z/;
36 }
37 if (/([A-Z0-9]+)err\(([^,]+)/ && ! /ckerr_ignore/)
38 {

--- 32 unchanged lines hidden ---