ctype.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:14k
源码类别:

DVD

开发平台:

Others

  1. /*
  2.  *      Paradigm C/C++ Run-Time Library - Version 5.0
  3.  *
  4.  *      Copyright (c) 1998 Paradigm Systems.  All rights reserved.
  5.  *      Portions Copyright (c) 1996 Borland International.
  6.  *
  7.  *      $Revision: 4 $
  8.  *
  9.  *      "C" locale ctype array.
  10.  */
  11. /*
  12.  * The "C" locale ctype array
  13. */
  14. #include "Config.h" // ZKR GL051004
  15. #if defined(_DEBUG) || defined(D_RELEASE_TRACE_ENABLED) // ZKR GL051004
  16. #define _IS_SP     1           /* space */
  17. #define _IS_DIG    2           /* digit */
  18. #define _IS_UPP    4           /* upper case */
  19. #define _IS_LOW    8           /* lower case */
  20. #define _IS_HEX   16           /* [0..9] or [A-F] or [a-f] */
  21. #define _IS_CTL   32           /* control */
  22. #define _IS_PUN   64           /* punctuation */
  23. #define _IS_BLK  128           /* blank */
  24. #define _IS_ALPHA    (_IS_UPP | _IS_LOW)
  25. #define _IS_ALNUM    (_IS_DIG | _IS_ALPHA)
  26. #define _IS_GRAPH    (_IS_ALNUM | _IS_HEX | _IS_PUN)
  27. #define SBCS_SIZE                              256
  28. #define SBCS_CTYPE_TSIZE            ( SBCS_SIZE + 1 )
  29. const far unsigned char _ctype[ SBCS_CTYPE_TSIZE ] =
  30. {
  31.     0x00,                                /* 0xffff (-1) EOF */
  32.     _IS_CTL,                             /* 0x00 */
  33.     _IS_CTL,                             /* 0x01 */
  34.     _IS_CTL,                             /* 0x02 */
  35.     _IS_CTL,                             /* 0x03 */
  36.     _IS_CTL,                             /* 0x04 */
  37.     _IS_CTL,                             /* 0x05 */
  38.     _IS_CTL,                             /* 0x06 */
  39.     _IS_CTL,                             /* 0x07 */
  40.     _IS_CTL,                             /* 0x08 */
  41.     _IS_SP | _IS_CTL,                    /* 0x09 */
  42.     _IS_SP | _IS_CTL,                    /* 0x0a */
  43.     _IS_SP | _IS_CTL,                    /* 0x0b */
  44.     _IS_SP | _IS_CTL,                    /* 0x0c */
  45.     _IS_SP | _IS_CTL,                    /* 0x0d */
  46.     _IS_CTL,                             /* 0x0e */
  47.     _IS_CTL,                             /* 0x0f */
  48.     _IS_CTL,                             /* 0x10 */
  49.     _IS_CTL,                             /* 0x11 */
  50.     _IS_CTL,                             /* 0x12 */
  51.     _IS_CTL,                             /* 0x13 */
  52.     _IS_CTL,                             /* 0x14 */
  53.     _IS_CTL,                             /* 0x15 */
  54.     _IS_CTL,                             /* 0x16 */
  55.     _IS_CTL,                             /* 0x17 */
  56.     _IS_CTL,                             /* 0x18 */
  57.     _IS_CTL,                             /* 0x19 */
  58.     _IS_CTL,                             /* 0x1a */
  59.     _IS_CTL,                             /* 0x1b */
  60.     _IS_CTL,                             /* 0x1c */
  61.     _IS_CTL,                             /* 0x1d */
  62.     _IS_CTL,                             /* 0x1e */
  63.     _IS_CTL,                             /* 0x1f */
  64.     _IS_SP | _IS_BLK,                    /* 0x20 */
  65.     _IS_PUN,                             /* 0x21 */
  66.     _IS_PUN,                             /* 0x22 */
  67.     _IS_PUN,                             /* 0x23 */
  68.     _IS_PUN,                             /* 0x24 */
  69.     _IS_PUN,                             /* 0x25 */
  70.     _IS_PUN,                             /* 0x26 */
  71.     _IS_PUN,                             /* 0x27 */
  72.     _IS_PUN,                             /* 0x28 */
  73.     _IS_PUN,                             /* 0x29 */
  74.     _IS_PUN,                             /* 0x2a */
  75.     _IS_PUN,                             /* 0x2b */
  76.     _IS_PUN,                             /* 0x2c */
  77.     _IS_PUN,                             /* 0x2d */
  78.     _IS_PUN,                             /* 0x2e */
  79.     _IS_PUN,                             /* 0x2f */
  80.     _IS_DIG | _IS_HEX,                   /* 0x30 */
  81.     _IS_DIG | _IS_HEX,                   /* 0x31 */
  82.     _IS_DIG | _IS_HEX,                   /* 0x32 */
  83.     _IS_DIG | _IS_HEX,                   /* 0x33 */
  84.     _IS_DIG | _IS_HEX,                   /* 0x34 */
  85.     _IS_DIG | _IS_HEX,                   /* 0x35 */
  86.     _IS_DIG | _IS_HEX,                   /* 0x36 */
  87.     _IS_DIG | _IS_HEX,                   /* 0x37 */
  88.     _IS_DIG | _IS_HEX,                   /* 0x38 */
  89.     _IS_DIG | _IS_HEX,                   /* 0x39 */
  90.     _IS_PUN,                             /* 0x3a */
  91.     _IS_PUN,                             /* 0x3b */
  92.     _IS_PUN,                             /* 0x3c */
  93.     _IS_PUN,                             /* 0x3d */
  94.     _IS_PUN,                             /* 0x3e */
  95.     _IS_PUN,                             /* 0x3f */
  96.     _IS_PUN,                             /* 0x40 */
  97.     _IS_UPP | _IS_HEX,                   /* 0x41 */
  98.     _IS_UPP | _IS_HEX,                   /* 0x42 */
  99.     _IS_UPP | _IS_HEX,                   /* 0x43 */
  100.     _IS_UPP | _IS_HEX,                   /* 0x44 */
  101.     _IS_UPP | _IS_HEX,                   /* 0x45 */
  102.     _IS_UPP | _IS_HEX,                   /* 0x46 */
  103.     _IS_UPP,                             /* 0x47 */
  104.     _IS_UPP,                             /* 0x48 */
  105.     _IS_UPP,                             /* 0x49 */
  106.     _IS_UPP,                             /* 0x4a */
  107.     _IS_UPP,                             /* 0x4b */
  108.     _IS_UPP,                             /* 0x4c */
  109.     _IS_UPP,                             /* 0x4d */
  110.     _IS_UPP,                             /* 0x4e */
  111.     _IS_UPP,                             /* 0x4f */
  112.     _IS_UPP,                             /* 0x50 */
  113.     _IS_UPP,                             /* 0x51 */
  114.     _IS_UPP,                             /* 0x52 */
  115.     _IS_UPP,                             /* 0x53 */
  116.     _IS_UPP,                             /* 0x54 */
  117.     _IS_UPP,                             /* 0x55 */
  118.     _IS_UPP,                             /* 0x56 */
  119.     _IS_UPP,                             /* 0x57 */
  120.     _IS_UPP,                             /* 0x58 */
  121.     _IS_UPP,                             /* 0x59 */
  122.     _IS_UPP,                             /* 0x5a */
  123.     _IS_PUN,                             /* 0x5b */
  124.     _IS_PUN,                             /* 0x5c */
  125.     _IS_PUN,                             /* 0x5d */
  126.     _IS_PUN,                             /* 0x5e */
  127.     _IS_PUN,                             /* 0x5f */
  128.     _IS_PUN,                             /* 0x60 */
  129.     _IS_LOW | _IS_HEX,                   /* 0x61 */
  130.     _IS_LOW | _IS_HEX,                   /* 0x62 */
  131.     _IS_LOW | _IS_HEX,                   /* 0x63 */
  132.     _IS_LOW | _IS_HEX,                   /* 0x64 */
  133.     _IS_LOW | _IS_HEX,                   /* 0x65 */
  134.     _IS_LOW | _IS_HEX,                   /* 0x66 */
  135.     _IS_LOW,                             /* 0x67 */
  136.     _IS_LOW,                             /* 0x68 */
  137.     _IS_LOW,                             /* 0x69 */
  138.     _IS_LOW,                             /* 0x6a */
  139.     _IS_LOW,                             /* 0x6b */
  140.     _IS_LOW,                             /* 0x6c */
  141.     _IS_LOW,                             /* 0x6d */
  142.     _IS_LOW,                             /* 0x6e */
  143.     _IS_LOW,                             /* 0x6f */
  144.     _IS_LOW,                             /* 0x70 */
  145.     _IS_LOW,                             /* 0x71 */
  146.     _IS_LOW,                             /* 0x72 */
  147.     _IS_LOW,                             /* 0x73 */
  148.     _IS_LOW,                             /* 0x74 */
  149.     _IS_LOW,                             /* 0x75 */
  150.     _IS_LOW,                             /* 0x76 */
  151.     _IS_LOW,                             /* 0x77 */
  152.     _IS_LOW,                             /* 0x78 */
  153.     _IS_LOW,                             /* 0x79 */
  154.     _IS_LOW,                             /* 0x7a */
  155.     _IS_PUN,                             /* 0x7b */
  156.     _IS_PUN,                             /* 0x7c */
  157.     _IS_PUN,                             /* 0x7d */
  158.     _IS_PUN,                             /* 0x7e */
  159.     _IS_CTL,                             /* 0x7f */
  160.     0x00,                                /* 0x80 */
  161.     0x00,                                /* 0x81 */
  162.     0x00,                                /* 0x82 */
  163.     0x00,                                /* 0x83 */
  164.     0x00,                                /* 0x84 */
  165.     0x00,                                /* 0x85 */
  166.     0x00,                                /* 0x86 */
  167.     0x00,                                /* 0x87 */
  168.     0x00,                                /* 0x88 */
  169.     0x00,                                /* 0x89 */
  170.     0x00,                                /* 0x8a */
  171.     0x00,                                /* 0x8b */
  172.     0x00,                                /* 0x8c */
  173.     0x00,                                /* 0x8d */
  174.     0x00,                                /* 0x8e */
  175.     0x00,                                /* 0x8f */
  176.     0x00,                                /* 0x90 */
  177.     0x00,                                /* 0x91 */
  178.     0x00,                                /* 0x92 */
  179.     0x00,                                /* 0x93 */
  180.     0x00,                                /* 0x94 */
  181.     0x00,                                /* 0x95 */
  182.     0x00,                                /* 0x96 */
  183.     0x00,                                /* 0x97 */
  184.     0x00,                                /* 0x98 */
  185.     0x00,                                /* 0x99 */
  186.     0x00,                                /* 0x9a */
  187.     0x00,                                /* 0x9b */
  188.     0x00,                                /* 0x9c */
  189.     0x00,                                /* 0x9d */
  190.     0x00,                                /* 0x9e */
  191.     0x00,                                /* 0x9f */
  192.     0x00,                                /* 0xa0 */
  193.     0x00,                                /* 0xa1 */
  194.     0x00,                                /* 0xa2 */
  195.     0x00,                                /* 0xa3 */
  196.     0x00,                                /* 0xa4 */
  197.     0x00,                                /* 0xa5 */
  198.     0x00,                                /* 0xa6 */
  199.     0x00,                                /* 0xa7 */
  200.     0x00,                                /* 0xa8 */
  201.     0x00,                                /* 0xa9 */
  202.     0x00,                                /* 0xaa */
  203.     0x00,                                /* 0xab */
  204.     0x00,                                /* 0xac */
  205.     0x00,                                /* 0xad */
  206.     0x00,                                /* 0xae */
  207.     0x00,                                /* 0xaf */
  208.     0x00,                                /* 0xb0 */
  209.     0x00,                                /* 0xb1 */
  210.     0x00,                                /* 0xb2 */
  211.     0x00,                                /* 0xb3 */
  212.     0x00,                                /* 0xb4 */
  213.     0x00,                                /* 0xb5 */
  214.     0x00,                                /* 0xb6 */
  215.     0x00,                                /* 0xb7 */
  216.     0x00,                                /* 0xb8 */
  217.     0x00,                                /* 0xb9 */
  218.     0x00,                                /* 0xba */
  219.     0x00,                                /* 0xbb */
  220.     0x00,                                /* 0xbc */
  221.     0x00,                                /* 0xbd */
  222.     0x00,                                /* 0xbe */
  223.     0x00,                                /* 0xbf */
  224.     0x00,                                /* 0xc0 */
  225.     0x00,                                /* 0xc1 */
  226.     0x00,                                /* 0xc2 */
  227.     0x00,                                /* 0xc3 */
  228.     0x00,                                /* 0xc4 */
  229.     0x00,                                /* 0xc5 */
  230.     0x00,                                /* 0xc6 */
  231.     0x00,                                /* 0xc7 */
  232.     0x00,                                /* 0xc8 */
  233.     0x00,                                /* 0xc9 */
  234.     0x00,                                /* 0xca */
  235.     0x00,                                /* 0xcb */
  236.     0x00,                                /* 0xcc */
  237.     0x00,                                /* 0xcd */
  238.     0x00,                                /* 0xce */
  239.     0x00,                                /* 0xcf */
  240.     0x00,                                /* 0xd0 */
  241.     0x00,                                /* 0xd1 */
  242.     0x00,                                /* 0xd2 */
  243.     0x00,                                /* 0xd3 */
  244.     0x00,                                /* 0xd4 */
  245.     0x00,                                /* 0xd5 */
  246.     0x00,                                /* 0xd6 */
  247.     0x00,                                /* 0xd7 */
  248.     0x00,                                /* 0xd8 */
  249.     0x00,                                /* 0xd9 */
  250.     0x00,                                /* 0xda */
  251.     0x00,                                /* 0xdb */
  252.     0x00,                                /* 0xdc */
  253.     0x00,                                /* 0xdd */
  254.     0x00,                                /* 0xde */
  255.     0x00,                                /* 0xdf */
  256.     0x00,                                /* 0xe0 */
  257.     0x00,                                /* 0xe1 */
  258.     0x00,                                /* 0xe2 */
  259.     0x00,                                /* 0xe3 */
  260.     0x00,                                /* 0xe4 */
  261.     0x00,                                /* 0xe5 */
  262.     0x00,                                /* 0xe6 */
  263.     0x00,                                /* 0xe7 */
  264.     0x00,                                /* 0xe8 */
  265.     0x00,                                /* 0xe9 */
  266.     0x00,                                /* 0xea */
  267.     0x00,                                /* 0xeb */
  268.     0x00,                                /* 0xec */
  269.     0x00,                                /* 0xed */
  270.     0x00,                                /* 0xee */
  271.     0x00,                                /* 0xef */
  272.     0x00,                                /* 0xf0 */
  273.     0x00,                                /* 0xf1 */
  274.     0x00,                                /* 0xf2 */
  275.     0x00,                                /* 0xf3 */
  276.     0x00,                                /* 0xf4 */
  277.     0x00,                                /* 0xf5 */
  278.     0x00,                                /* 0xf6 */
  279.     0x00,                                /* 0xf7 */
  280.     0x00,                                /* 0xf8 */
  281.     0x00,                                /* 0xf9 */
  282.     0x00,                                /* 0xfa */
  283.     0x00,                                /* 0xfb */
  284.     0x00,                                /* 0xfc */
  285.     0x00,                                /* 0xfd */
  286.     0x00,                                /* 0xfe */
  287.     0x00                                 /* 0xff */
  288. };
  289. #endif // #if defined(_DEBUG) || defined(D_RELEASE_TRACE_ENABLED) // ZKR GL051004