home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / sqdev200.zip / samples / _ctype.c next >
C/C++ Source or Header  |  1994-05-23  |  2KB  |  51 lines

  1.  
  2. /* The MSC toupper macro breaks the ansi rules for side effects.
  3.  *
  4.  * Rather than figure out where in Max we must use the toupper() function
  5.  * rather than the macro,  I've decided to waste a little memory on
  6.  * a table and macro that works properly.
  7.  * 
  8.  * P.Fitzsimmons.
  9.  */
  10.  
  11. #include "compiler.h"
  12.  
  13. #ifdef __MSC__
  14.  
  15. unsigned char _MyUprTab[256] = {
  16.       0,   1,   2,   3,   4,   5,   6,   7,
  17.       8,   9,  10,  11,  12,  13,  14,  15,
  18.      16,  17,  18,  19,  20,  21,  22,  23,
  19.      24,  25,  26,  27,  28,  29,  30,  31,
  20.      32,  33,  34,  35,  36,  37,  38,  39,
  21.      40,  41,  42,  43,  44,  45,  46,  47,
  22.      48,  49,  50,  51,  52,  53,  54,  55,
  23.      56,  57,  58,  59,  60,  61,  62,  63,
  24.      64,  65,  66,  67,  68,  69,  70,  71,
  25.      72,  73,  74,  75,  76,  77,  78,  79,
  26.      80,  81,  82,  83,  84,  85,  86,  87,
  27.      88,  89,  90,  91,  92,  93,  94,  95,
  28.      96,  65,  66,  67,  68,  69,  70,  71,
  29.      72,  73,  74,  75,  76,  77,  78,  79,
  30.      80,  81,  82,  83,  84,  85,  86,  87,
  31.      88,  89,  90, 123, 124, 125, 126, 127,
  32.     128, 129, 130, 131, 132, 133, 134, 135,
  33.     136, 137, 138, 139, 140, 141, 142, 143,
  34.     144, 145, 146, 147, 148, 149, 150, 151,
  35.     152, 153, 154, 155, 156, 157, 158, 159,
  36.     160, 161, 162, 163, 164, 165, 166, 167,
  37.     168, 169, 170, 171, 172, 173, 174, 175,
  38.     176, 177, 178, 179, 180, 181, 182, 183,
  39.     184, 185, 186, 187, 188, 189, 190, 191,
  40.     192, 193, 194, 195, 196, 197, 198, 199,
  41.     200, 201, 202, 203, 204, 205, 206, 207,
  42.     208, 209, 210, 211, 212, 213, 214, 215,
  43.     216, 217, 218, 219, 220, 221, 222, 223,
  44.     224, 225, 226, 227, 228, 229, 230, 231,
  45.     232, 233, 234, 235, 236, 237, 238, 239,
  46.     240, 241, 242, 243, 244, 245, 246, 247,
  47.     248, 249, 250, 251, 252, 253, 254, 255
  48. };
  49.  
  50. #endif
  51.