21 $v|=$NUMBER if ($c =~ /[0-9]/);
22 $v|=$UPPER if ($c =~ /[A-Z]/);
23 $v|=$LOWER if ($c =~ /[a-z]/);
24 $v|=$UNDER if ($c =~ /_/);
25 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
26 $v|=$WS if ($c =~ /[ \t\r\n]/);
27 $v|=$ESC if ($c =~ /\\/);
28 $v|=$QUOTE if ($c =~ /['`"]/); # for emacs: "`'}/)
29 $v|=$COMMENT if ($c =~ /\#/);
30 $v|=$EOF if ($c =~ /\0/);
31 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
40 $v|=$NUMBER if ($c =~ /[0-9]/);
41 $v|=$UPPER if ($c =~ /[A-Z]/);
42 $v|=$LOWER if ($c =~ /[a-z]/);
43 $v|=$UNDER if ($c =~ /_/);
44 $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/);
45 $v|=$WS if ($c =~ /[ \t\r\n]/);
46 $v|=$DQUOTE if ($c =~ /["]/); # for emacs: "}/)
47 $v|=$FCOMMENT if ($c =~ /;/);
48 $v|=$EOF if ($c =~ /\0/);
49 $v|=$HIGHBIT if ($c =~/[\x80-\xff]/);
55 /* Copyright (C) 1995-1998 Eric Young (eay\@cryptsoft.com)
56 * All rights reserved.
58 * This package is an SSL implementation written
59 * by Eric Young (eay\@cryptsoft.com).
60 * The implementation was written so as to conform with Netscapes SSL.
62 * This library is free for commercial and non-commercial use as long as
63 * the following conditions are aheared to. The following conditions
64 * apply to all code found in this distribution, be it the RC4, RSA,
65 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
66 * included with this distribution is covered by the same copyright terms
67 * except that the holder is Tim Hudson (tjh\@cryptsoft.com).
69 * Copyright remains Eric Young's, and as such any Copyright notices in
70 * the code are not to be removed.
71 * If this package is used in a product, Eric Young should be given attribution
72 * as the author of the parts of the library used.
73 * This can be in the form of a textual message at program startup or
74 * in documentation (online or textual) provided with the package.
76 * Redistribution and use in source and binary forms, with or without
77 * modification, are permitted provided that the following conditions
79 * 1. Redistributions of source code must retain the copyright
80 * notice, this list of conditions and the following disclaimer.
81 * 2. Redistributions in binary form must reproduce the above copyright
82 * notice, this list of conditions and the following disclaimer in the
83 * documentation and/or other materials provided with the distribution.
84 * 3. All advertising materials mentioning features or use of this software
85 * must display the following acknowledgement:
86 * "This product includes cryptographic software written by
87 * Eric Young (eay\@cryptsoft.com)"
88 * The word 'cryptographic' can be left out if the rouines from the library
89 * being used are not cryptographic related :-).
90 * 4. If you include any Windows specific code (or a derivative thereof) from
91 * the apps directory (application code) you must include an acknowledgement:
92 * "This product includes software written by Tim Hudson (tjh\@cryptsoft.com)"
94 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
95 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
96 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
97 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
98 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
99 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
100 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
101 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
102 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
103 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
106 * The licence and distribution terms for any publically available version or
107 * derivative of this code cannot be changed. i.e. this code cannot simply be
108 * copied and put under another distribution licence
109 * [including the GNU Public Licence.]
113 * THIS FILE WAS AUTOMAGICALLY GENERATED! Please modify and use keysets.pl to
117 #define CONF_NUMBER 1
120 #define CONF_UNDER 256
121 #define CONF_PUNCTUATION 512
124 #define CONF_QUOTE 64
125 #define CONF_DQUOTE 1024
126 #define CONF_COMMENT 128
127 #define CONF_FCOMMENT 2048
129 #define CONF_HIGHBIT 4096
130 #define CONF_ALPHA (CONF_UPPER|CONF_LOWER)
131 #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER)
132 #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\
135 #define KEYTYPES(c) ((const unsigned short *)((c)->meth_data))
136 #ifndef CHARSET_EBCDIC
137 # define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT)
138 # define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT)
139 # define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF)
140 # define IS_ESC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ESC)
141 # define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_NUMBER)
142 # define IS_WS(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_WS)
143 # define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC)
144 # define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
145 (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
146 # define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_QUOTE)
147 # define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE)
148 # define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT)
150 #else /* CHARSET_EBCDIC */
152 # define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT)
153 # define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT)
154 # define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF)
155 # define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC)
156 # define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER)
157 # define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS)
158 # define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC)
159 # define IS_ALPHA_NUMERIC_PUNCT(c,a) \\
160 (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT)
161 # define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE)
162 # define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE)
163 # define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT)
164 #endif /* CHARSET_EBCDIC */
168 print "static const unsigned short CONF_type_default[256] = {";
170 for ($i=0; $i<256; $i++)
172 print "\n " if ($i % 8) == 0;
173 printf " 0x%04X,",$V_def[$i];
178 print "static const unsigned short CONF_type_win32[256] = {";
180 for ($i=0; $i<256; $i++)
182 print "\n " if ($i % 8) == 0;
183 printf " 0x%04X,",$V_w32[$i];