]> mj.ucw.cz Git - libucw.git/blobdiff - charset/unicode.h
Updated the charset conversion library to UniCode 3.0.
[libucw.git] / charset / unicode.h
index a01eb97c23d22b004cca1a60a9b17b7c103c480e..50d4ed777024000a306ef445384a5fa037389a29 100644 (file)
@@ -1,31 +1,17 @@
 /*
  *     The UniCode Library
  *
 /*
  *     The UniCode Library
  *
- *     (c) 1997 Martin Mares, <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  */
 
 #ifndef _UNICODE_H
 #define _UNICODE_H
 
  */
 
 #ifndef _UNICODE_H
 #define _UNICODE_H
 
-#include "lib/config.h"
+#include "lib/chartype.h"
 
 
-extern byte *_U_cat[], *_U_sig[];
+extern byte *_U_cat[];
 extern word *_U_upper[], *_U_lower[], *_U_unaccent[];
 
 extern word *_U_upper[], *_U_lower[], *_U_unaccent[];
 
-#define _C_UPPER 1                     /* Upper-case letters */
-#define _C_LOWER 2                     /* Lower-case letters */
-#define _C_PRINT 4                     /* Printable */
-#define _C_DIGIT 8                     /* Digits */
-#define _C_CTRL 16                     /* Control characters */
-#define _C_XDIGIT 32                   /* Hexadecimal digits */
-#define _C_BLANK 64                    /* Blanks */
-#define _C_INNER 128                   /* `inner punctuation' -- underscore etc. */
-
-#define _C_ALPHA (_C_UPPER | _C_LOWER)
-#define _C_ALNUM (_C_ALPHA | _C_DIGIT)
-#define _C_WORD (_C_ALNUM | _C_INNER)
-#define _C_WSTART (_C_ALPHA | _C_INNER)
-
 static inline uns Ucategory(word x)
 {
   if (_U_cat[x >> 8U])
 static inline uns Ucategory(word x)
 {
   if (_U_cat[x >> 8U])
@@ -52,14 +38,6 @@ static inline word Uunaccent(word x)
   return w ? w : x;
 }
 
   return w ? w : x;
 }
 
-static inline byte Usig(word x)
-{
-  if (_U_sig[x >> 8U])
-    return _U_sig[x >> 8U][x & 0xff] ? : 0xff;
-  else
-    return 0xff;
-}
-
 #define UCat(x,y) (Ucategory(x) & (y))
 
 #define Uupper(x) UCat(x, _C_UPPER)
 #define UCat(x,y) (Ucategory(x) & (y))
 
 #define Uupper(x) UCat(x, _C_UPPER)