* This way we bypass most possible problems with different compilation environments.
*
* All functions and macros accept any numbers and if it is necessary, they simply ignore higher bits.
- * It does not matter whether a parameter is signed or unsigned. Parameters are evaluated exactly once,
+ * It does not matter whether a parameter is signed or uintigned. Parameters are evaluated exactly once,
* so they can have side-effects.
***/
#define _C_WORD (_C_ALNUM | _C_INNER)
#define _C_WSTART (_C_ALPHA | _C_INNER)
-extern const byte _c_cat[256], _c_upper[256], _c_lower[256];
+extern const byte ucw_c_cat[256], ucw_c_upper[256], ucw_c_lower[256];
-#define Category(x) (_c_cat[(byte)(x)])
+#define Category(x) (ucw_c_cat[(byte)(x)])
#define Ccat(x,y) (Category(x) & y)
#define Cupper(x) Ccat(x, _C_UPPER) /** Checks for an upper-case character (`A-Z`). **/
#define Cctrl(x) Ccat(x, _C_CTRL) /** Checks for control characters (`0x0-0x1F`, `0x7F`). **/
#define Cspace(x) Cblank(x)
-#define Cupcase(x) (_c_upper[(byte)(x)]) /** Convert a letter to upper case, leave non-letter characters unchanged. **/
-#define Clocase(x) (_c_lower[(byte)(x)]) /** Convert a letter to lower case, leave non-letter characters unchanged. **/
+#define Cupcase(x) (ucw_c_upper[(byte)(x)]) /** Convert a letter to upper case, leave non-letter characters unchanged. **/
+#define Clocase(x) (ucw_c_lower[(byte)(x)]) /** Convert a letter to lower case, leave non-letter characters unchanged. **/
/**
* Compute the value of a valid hexadecimal character (ie. passed the @Cxdigit() check).
**/
-static inline uns Cxvalue(byte x)
+static inline uint Cxvalue(byte x)
{
- return (x < (uns)'A') ? x - '0' : (x & 0xdf) - 'A' + 10;
+ return (x < (uint)'A') ? x - '0' : (x & 0xdf) - 'A' + 10;
}
#endif