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