_ctype.c
上传用户:jmzj888
上传日期:2007-01-02
资源大小:220k
文件大小:38k
- /* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
- This file is public domain and comes with NO WARRANTY of any kind */
- /* Define arrays to map character codes to types, uppercase, lowercase and
- sortorder.
- Define USE_LLLNBITCHARS_D to tell witch tabels to define.
- LLL = Name of charset SWE, USA, HP
- N = 7 or 8 bit chars.
- */
- /* If you define a new charset to this file you must add the name to
- the CHARSSETS variable in the makefile */
- #include <global.h>
- #include "m_string.h"
- #ifndef _MSC_VER
- #define uchar char /* Skipp warnings that '377' isn't unsigned*/
- #endif
- #ifdef SWE7
- uchar NEAR ctype_swe7[257] =
- {
- 0, /* For standard library */
- 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 1,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,16,
- 1,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,32,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- };
- uchar NEAR to_lower_swe7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR to_upper_swe7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR sort_order_swe7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- 'E', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '\', ']', '[', 'Y', '_',
- 'E', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '\', ']', '[', 'Y', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #ifdef USA7
- uchar NEAR ctype_usa7[257] =
- {
- 0, /* For standard library */
- 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
- 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- };
- uchar NEAR to_lower_usa7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', '\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR to_upper_usa7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR sort_order_usa7[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '\', ']', '[', '^', '_',
- 'E', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', 'Y', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #ifdef HP8
- uchar NEAR ctype_hp8[257] = {
- 0,
- 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
- 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 32,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,32,32,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,2,16,16,16,16,16,16,2,16,2,2,
- 1,16,16,1,2,16,16,2,1,16,1,1,1,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,32,32,32,32,16,16,16,16,16,16,16,16,16,32,
- };
- uchar NEAR to_lower_hp8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', '\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','310','300','311','301','315','321','335',
- '250','251','252','253','254','313','303','257',
- '260','262','262','263','265','265','267','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '324','321','326','327','324','325','326','327',
- '314','331','316','317','305','335','336','302',
- '304','342','342','344','344','325','331','306',
- '312','352','352','354','354','307','357','357',
- '361','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR to_upper_hp8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','261','263','264','264','266','266',
- '270','271','272','273','274','275','276','277',
- '242','244','337','256','340','334','347','355',
- '241','243','350','255','330','245','332','333',
- '320','246','322','323','320','345','322','323',
- '330','346','332','333','334','247','336','337',
- '340','341','341','343','343','345','346','347',
- '350','351','351','353','353','355','356','356',
- '360','360','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR sort_order_hp8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '\', ']', '[', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- /* Use HP */
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #ifdef DEC8
- #define CTYPE /* initialize ctype arrays */
- #include "m_ctype.h"
- void init_ctype() /* Stupid linker !! */
- {} /* Some symbol must be defined */
- uchar ctype_dec8[257] =
- {
- 0, /* For standard library */
- 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
- 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,16,1,1,1,1,1,1,1,2,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,16,2,2,2,2,2,2,2,2,
- };
- uchar NEAR to_lower_dec8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', '\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','327',
- '370','371','372','373','374','375','376','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR to_upper_dec8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','367',
- '330','331','332','333','334','335','336','377',
- };
- uchar NEAR sort_order_dec8[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- 'A', 'A', 'A', 'A', '\', '[', '\', 'C',
- 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
- 'D', 'N', 'O', 'O', 'O', 'O', ']', '327',
- '330','U', 'U', 'U', 'Y', 'Y', '336','337',
- 'A', 'A', 'A', 'A', '\', '[', '\', 'C',
- 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
- 'D', 'N', 'O', 'O', 'O', 'O', ']', '367',
- '330','U', 'U', 'U', 'Y', 'Y', '336','377',
- };
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #ifdef MSDOS
- #ifndef _WINDOWS
- uchar NEAR ctype[257] =
- {
- 0, /* For standard library */
- 32,48,48,48,48,48,48,32,32,40,40,40,40,40,48,48,
- 48,48,48,48,48,48,48,48,48,48,32,48,48,48,48,48,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
- 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,48,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,
- 1,2,1,2,2,2,2,2,2,1,1,16,16,16,16,16,
- 2,2,2,2,2,1,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,32,
- };
- uchar NEAR to_lower[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', '\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- 135, 129, 130, 131, 132, 133, 134, 135,
- 136, 137, 138, 139, 140, 141, 132, 134,
- 130, 145, 145, 147, 148, 149, 150, 151,
- 152, 148, 129, 155, 156, 157, 158, 159,
- 160, 161, 162, 163, 164, 164, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255,
- };
- #endif
- uchar NEAR to_upper[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- 128, 154, 144, 65, 142, 65, 143, 128,
- 69, 69, 69, 73, 73, 73, 142, 143,
- 144, 146, 146, 79, 153, 79, 85, 85,
- 89, 153, 154, 155, 156, 157, 158, 159,
- 65, 73, 79, 85, 165, 165, 166, 167,
- 168, 169, 170, 171, 172, 173, 174, 175,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255,
- };
- uchar NEAR sort_order[]=
- {
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- 67, 89, 69, 65, 92, 65, 91, 67,
- 69, 69, 69, 73, 73, 73, 92, 91,
- 69, 92, 92, 79, 93, 79, 85, 85,
- 89, 93, 89, 36, 36, 36, 36, 36,
- 65, 73, 79, 85, 78, 78, 166, 167,
- 63, 169, 170, 171, 172, 33, 34, 34,
- 176, 177, 178, 179, 180, 181, 182, 183,
- 184, 185, 186, 187, 188, 189, 190, 191,
- 192, 193, 194, 195, 196, 197, 198, 199,
- 200, 201, 202, 203, 204, 205, 206, 207,
- 208, 209, 210, 211, 212, 213, 214, 215,
- 216, 217, 218, 219, 220, 221, 222, 223,
- 224, 225, 226, 227, 228, 229, 230, 231,
- 232, 233, 234, 235, 236, 237, 238, 239,
- 240, 241, 242, 243, 244, 245, 246, 247,
- 248, 249, 250, 251, 252, 253, 254, 255,
- };
- #endif
- /****************************************************************************/
- /****************************************************************************/
- #ifdef ISO_8859
- uchar NEAR ctype_ISO_8859_1[257] = {
- 0,
- 32,32,32,32,32,32,32,32,32,40,40,40,40,40,32,32,
- 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 132,132,132,132,132,132,132,132,132,132,16,16,16,16,16,16,
- 16,129,129,129,129,129,129,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,1,1,1,1,16,16,16,16,16,
- 16,130,130,130,130,130,130,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,2,2,2,2,16,16,16,16,32,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 72,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
- 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
- 1,1,1,1,1,1,1,16,1,1,1,1,1,1,1,2,
- 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
- 2,2,2,2,2,2,2,16,2,2,2,2,2,2,2,2,
- };
- uchar NEAR to_lower_ISO_8859_1[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '[', '\', ']', '^', '_',
- '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
- 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
- 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
- 'x', 'y', 'z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','327',
- '370','371','372','373','374','375','376','337',
- '340','341','342','343','344','345','346','347',
- '350','351','352','353','354','355','356','357',
- '360','361','362','363','364','365','366','367',
- '370','371','372','373','374','375','376','377',
- };
- uchar NEAR to_upper_ISO_8859_1[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','327',
- '330','331','332','333','334','335','336','337',
- '300','301','302','303','304','305','306','307',
- '310','311','312','313','314','315','316','317',
- '320','321','322','323','324','325','326','367',
- '330','331','332','333','334','335','336','377',
- };
- uchar NEAR sort_order_ISO_8859_1[]={
- ' 00',' 01',' 02',' 03',' 04',' 05',' 06',' 07',
- ' 10',' 11',' 12',' 13',' 14',' 15',' 16',' 17',
- ' 20',' 21',' 22',' 23',' 24',' 25',' 26',' 27',
- ' 30',' 31',' 32',' 33',' 34',' 35',' 36',' 37',
- ' ', '!', '"', '#', '$', '%', '&', ''',
- '(', ')', '*', '+', ',', '-', '.', '/',
- '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', ':', ';', '<', '=', '>', '?',
- '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '[', '\', ']', '^', '_',
- '`', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
- 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
- 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
- 'X', 'Y', 'Z', '{', '|', '}', '~', '177',
- '200','201','202','203','204','205','206','207',
- '210','211','212','213','214','215','216','217',
- '220','221','222','223','224','225','226','227',
- '230','231','232','233','234','235','236','237',
- '240','241','242','243','244','245','246','247',
- '250','251','252','253','254','255','256','257',
- '260','261','262','263','264','265','266','267',
- '270','271','272','273','274','275','276','277',
- 'A', 'A', 'A', 'A', '\', '[', '\', 'C',
- 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
- 'D', 'N', 'O', 'O', 'O', 'O', ']', '327',
- '330','U', 'U', 'U', 'Y', 'Y', '336','337',
- 'A', 'A', 'A', 'A', '\', '[', '\', 'C',
- 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
- 'D', 'N', 'O', 'O', 'O', 'O', ']', '367',
- '330','U', 'U', 'U', 'Y', 'Y', '336','377',
- };
- #endif