155714Skris#!/usr/local/bin/perl 255714Skris 355714Skris$NUMBER=0x01; 455714Skris$UPPER=0x02; 555714Skris$LOWER=0x04; 668651Skris$UNDER=0x100; 768651Skris$PUNCTUATION=0x200; 855714Skris$WS=0x10; 955714Skris$ESC=0x20; 1055714Skris$QUOTE=0x40; 1168651Skris$DQUOTE=0x400; 1255714Skris$COMMENT=0x80; 1368651Skris$FCOMMENT=0x800; 1468651Skris$EOF=0x08; 15100928Snectar$HIGHBIT=0x1000; 1655714Skris 17100928Snectarforeach (0 .. 255) 1855714Skris { 1955714Skris $v=0; 2055714Skris $c=sprintf("%c",$_); 2155714Skris $v|=$NUMBER if ($c =~ /[0-9]/); 2255714Skris $v|=$UPPER if ($c =~ /[A-Z]/); 2355714Skris $v|=$LOWER if ($c =~ /[a-z]/); 2455714Skris $v|=$UNDER if ($c =~ /_/); 2568651Skris $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/); 2668651Skris $v|=$WS if ($c =~ /[ \t\r\n]/); 2755714Skris $v|=$ESC if ($c =~ /\\/); 2868651Skris $v|=$QUOTE if ($c =~ /['`"]/); # for emacs: "`'}/) 2955714Skris $v|=$COMMENT if ($c =~ /\#/); 3055714Skris $v|=$EOF if ($c =~ /\0/); 31100928Snectar $v|=$HIGHBIT if ($c =~/[\x80-\xff]/); 3255714Skris 3368651Skris push(@V_def,$v); 3455714Skris } 3555714Skris 36100928Snectarforeach (0 .. 255) 3768651Skris { 3868651Skris $v=0; 3968651Skris $c=sprintf("%c",$_); 4068651Skris $v|=$NUMBER if ($c =~ /[0-9]/); 4168651Skris $v|=$UPPER if ($c =~ /[A-Z]/); 4268651Skris $v|=$LOWER if ($c =~ /[a-z]/); 4368651Skris $v|=$UNDER if ($c =~ /_/); 4468651Skris $v|=$PUNCTUATION if ($c =~ /[!\.%&\*\+,\/;\?\@\^\~\|-]/); 4568651Skris $v|=$WS if ($c =~ /[ \t\r\n]/); 4668651Skris $v|=$DQUOTE if ($c =~ /["]/); # for emacs: "}/) 4768651Skris $v|=$FCOMMENT if ($c =~ /;/); 4868651Skris $v|=$EOF if ($c =~ /\0/); 49100928Snectar $v|=$HIGHBIT if ($c =~/[\x80-\xff]/); 5068651Skris 5168651Skris push(@V_w32,$v); 5268651Skris } 5368651Skris 5455714Skrisprint <<"EOF"; 5568651Skris/* crypto/conf/conf_def.h */ 5668651Skris/* Copyright (C) 1995-1998 Eric Young (eay\@cryptsoft.com) 5768651Skris * All rights reserved. 5868651Skris * 5968651Skris * This package is an SSL implementation written 6068651Skris * by Eric Young (eay\@cryptsoft.com). 6168651Skris * The implementation was written so as to conform with Netscapes SSL. 6268651Skris * 6368651Skris * This library is free for commercial and non-commercial use as long as 6468651Skris * the following conditions are aheared to. The following conditions 6568651Skris * apply to all code found in this distribution, be it the RC4, RSA, 6668651Skris * lhash, DES, etc., code; not just the SSL code. The SSL documentation 6768651Skris * included with this distribution is covered by the same copyright terms 6868651Skris * except that the holder is Tim Hudson (tjh\@cryptsoft.com). 6968651Skris * 7068651Skris * Copyright remains Eric Young's, and as such any Copyright notices in 7168651Skris * the code are not to be removed. 7268651Skris * If this package is used in a product, Eric Young should be given attribution 7368651Skris * as the author of the parts of the library used. 7468651Skris * This can be in the form of a textual message at program startup or 7568651Skris * in documentation (online or textual) provided with the package. 7668651Skris * 7768651Skris * Redistribution and use in source and binary forms, with or without 7868651Skris * modification, are permitted provided that the following conditions 7968651Skris * are met: 8068651Skris * 1. Redistributions of source code must retain the copyright 8168651Skris * notice, this list of conditions and the following disclaimer. 8268651Skris * 2. Redistributions in binary form must reproduce the above copyright 8368651Skris * notice, this list of conditions and the following disclaimer in the 8468651Skris * documentation and/or other materials provided with the distribution. 8568651Skris * 3. All advertising materials mentioning features or use of this software 8668651Skris * must display the following acknowledgement: 8768651Skris * "This product includes cryptographic software written by 8868651Skris * Eric Young (eay\@cryptsoft.com)" 8968651Skris * The word 'cryptographic' can be left out if the rouines from the library 9068651Skris * being used are not cryptographic related :-). 9168651Skris * 4. If you include any Windows specific code (or a derivative thereof) from 9268651Skris * the apps directory (application code) you must include an acknowledgement: 9368651Skris * "This product includes software written by Tim Hudson (tjh\@cryptsoft.com)" 9468651Skris * 9568651Skris * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 9668651Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 9768651Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 9868651Skris * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 9968651Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 10068651Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 10168651Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 10268651Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 10368651Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 10468651Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 10568651Skris * SUCH DAMAGE. 10668651Skris * 10768651Skris * The licence and distribution terms for any publically available version or 10868651Skris * derivative of this code cannot be changed. i.e. this code cannot simply be 10968651Skris * copied and put under another distribution licence 11068651Skris * [including the GNU Public Licence.] 11168651Skris */ 11268651Skris 11368651Skris/* THIS FILE WAS AUTOMAGICALLY GENERATED! 11468651Skris Please modify and use keysets.pl to regenerate it. */ 11568651Skris 11655714Skris#define CONF_NUMBER $NUMBER 11755714Skris#define CONF_UPPER $UPPER 11855714Skris#define CONF_LOWER $LOWER 11968651Skris#define CONF_UNDER $UNDER 12068651Skris#define CONF_PUNCTUATION $PUNCTUATION 12155714Skris#define CONF_WS $WS 12255714Skris#define CONF_ESC $ESC 12355714Skris#define CONF_QUOTE $QUOTE 12468651Skris#define CONF_DQUOTE $DQUOTE 12555714Skris#define CONF_COMMENT $COMMENT 12668651Skris#define CONF_FCOMMENT $FCOMMENT 12768651Skris#define CONF_EOF $EOF 128100928Snectar#define CONF_HIGHBIT $HIGHBIT 12955714Skris#define CONF_ALPHA (CONF_UPPER|CONF_LOWER) 13055714Skris#define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) 13168651Skris#define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \\ 13268651Skris CONF_PUNCTUATION) 13355714Skris 13468651Skris#define KEYTYPES(c) ((unsigned short *)((c)->meth_data)) 13568651Skris#ifndef CHARSET_EBCDIC 136100928Snectar#define IS_COMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_COMMENT) 137100928Snectar#define IS_FCOMMENT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_FCOMMENT) 138100928Snectar#define IS_EOF(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_EOF) 139100928Snectar#define IS_ESC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ESC) 140100928Snectar#define IS_NUMBER(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_NUMBER) 141100928Snectar#define IS_WS(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_WS) 142100928Snectar#define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC) 14368651Skris#define IS_ALPHA_NUMERIC_PUNCT(c,a) \\ 144100928Snectar (KEYTYPES(c)[(a)&0xff]&CONF_ALPHA_NUMERIC_PUNCT) 145100928Snectar#define IS_QUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_QUOTE) 146100928Snectar#define IS_DQUOTE(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_DQUOTE) 147100928Snectar#define IS_HIGHBIT(c,a) (KEYTYPES(c)[(a)&0xff]&CONF_HIGHBIT) 14855714Skris 14968651Skris#else /*CHARSET_EBCDIC*/ 15068651Skris 151100928Snectar#define IS_COMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_COMMENT) 152100928Snectar#define IS_FCOMMENT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_FCOMMENT) 153100928Snectar#define IS_EOF(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_EOF) 154100928Snectar#define IS_ESC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ESC) 155100928Snectar#define IS_NUMBER(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_NUMBER) 156100928Snectar#define IS_WS(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_WS) 157100928Snectar#define IS_ALPHA_NUMERIC(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC) 15868651Skris#define IS_ALPHA_NUMERIC_PUNCT(c,a) \\ 159100928Snectar (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_ALPHA_NUMERIC_PUNCT) 160100928Snectar#define IS_QUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_QUOTE) 161100928Snectar#define IS_DQUOTE(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_DQUOTE) 162100928Snectar#define IS_HIGHBIT(c,a) (KEYTYPES(c)[os_toascii[a]&0xff]&CONF_HIGHBIT) 16368651Skris#endif /*CHARSET_EBCDIC*/ 16468651Skris 16555714SkrisEOF 16655714Skris 167100928Snectarprint "static unsigned short CONF_type_default[256]={"; 16855714Skris 169100928Snectarfor ($i=0; $i<256; $i++) 17055714Skris { 17155714Skris print "\n\t" if ($i % 8) == 0; 172100928Snectar printf "0x%04X,",$V_def[$i]; 17355714Skris } 17455714Skris 17568651Skrisprint "\n\t};\n\n"; 17668651Skris 177100928Snectarprint "static unsigned short CONF_type_win32[256]={"; 17868651Skris 179100928Snectarfor ($i=0; $i<256; $i++) 18068651Skris { 18168651Skris print "\n\t" if ($i % 8) == 0; 182100928Snectar printf "0x%04X,",$V_w32[$i]; 18368651Skris } 18468651Skris 18568651Skrisprint "\n\t};\n\n"; 186