Skip to content

Commit e18cf66

Browse files
committed
Adjust a last few generators to new license boilerplate and C code style
Reviewed-by: Rich Salz <[email protected]>
1 parent e428f59 commit e18cf66

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

crypto/asn1/charmap.pl

+16-4
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,29 @@
7070
# Now generate the C code
7171

7272
print <<EOF;
73-
/* Auto generated with chartype.pl script.
73+
/*
74+
* WARNING: do not edit!
75+
* Generated by crypto/asn1/charmap.pl
76+
*
77+
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
78+
* Licensed under the OpenSSL license (the "License"). You may not use
79+
* this file except in compliance with the License. You can obtain a copy
80+
* in the file LICENSE in the source distribution or at
81+
* https://www.openssl.org/source/license.html
82+
*/
83+
84+
/*
7485
* Mask of various character properties
7586
*/
7687
7788
static const unsigned char char_type[] = {
7889
EOF
7990

91+
print " ";
8092
for($i = 0; $i < 128; $i++) {
81-
print("\n") if($i && (($i % 16) == 0));
82-
printf("%2d", $arr[$i]);
93+
print("\n ") if($i && (($i % 16) == 0));
94+
printf(" %2d", $arr[$i]);
8395
print(",") if ($i != 127);
8496
}
85-
print("\n};\n\n");
97+
print("\n};\n");
8698

crypto/conf/keysets.pl

+11-11
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,18 @@
104104
105105
#else /* CHARSET_EBCDIC */
106106
107-
# define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT)
108-
# define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT)
109-
# define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF)
110-
# define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC)
111-
# define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER)
112-
# define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS)
113-
# define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC)
107+
# define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_COMMENT)
108+
# define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_FCOMMENT)
109+
# define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_EOF)
110+
# define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ESC)
111+
# define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_NUMBER)
112+
# define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_WS)
113+
# define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC)
114114
# define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
115-
(KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
116-
# define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE)
117-
# define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE)
118-
# define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT)
115+
(KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_ALPHA_NUMERIC_PUNCT)
116+
# define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_QUOTE)
117+
# define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_DQUOTE)
118+
# define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a & 0xff]]&CONF_HIGHBIT)
119119
#endif /* CHARSET_EBCDIC */
120120
121121
EOF

0 commit comments

Comments
 (0)