Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

utf32.h File Reference

C API: UTF-32 macros. More...

Go to the source code of this file.

Defines

#define UTF32_IS_SAFE(c, strict)
#define UTF32_IS_SINGLE(uchar)    1
#define UTF32_IS_LEAD(uchar)    0
#define UTF32_IS_TRAIL(uchar)    0
#define UTF32_NEED_MULTIPLE_UCHAR(c)    0
#define UTF32_CHAR_LENGTH(c)    1
#define UTF32_MAX_CHAR_LENGTH   1
#define UTF32_ARRAY_SIZE(size)    (size)
#define UTF32_GET_CHAR_UNSAFE(s, i, c)
#define UTF32_GET_CHAR_SAFE(s, start, i, length, c, strict)
#define UTF32_NEXT_CHAR_UNSAFE(s, i, c)
#define UTF32_APPEND_CHAR_UNSAFE(s, i, c)
#define UTF32_FWD_1_UNSAFE(s, i)
#define UTF32_FWD_N_UNSAFE(s, i, n)
#define UTF32_SET_CHAR_START_UNSAFE(s, i)
#define UTF32_NEXT_CHAR_SAFE(s, i, length, c, strict)
#define UTF32_APPEND_CHAR_SAFE(s, i, length, c)
#define UTF32_FWD_1_SAFE(s, i, length)
#define UTF32_FWD_N_SAFE(s, i, length, n)
#define UTF32_SET_CHAR_START_SAFE(s, start, i)
#define UTF32_PREV_CHAR_UNSAFE(s, i, c)
#define UTF32_BACK_1_UNSAFE(s, i)
#define UTF32_BACK_N_UNSAFE(s, i, n)
#define UTF32_SET_CHAR_LIMIT_UNSAFE(s, i)
#define UTF32_PREV_CHAR_SAFE(s, start, i, c, strict)
#define UTF32_BACK_1_SAFE(s, start, i)
#define UTF32_BACK_N_SAFE(s, start, i, n)
#define UTF32_SET_CHAR_LIMIT_SAFE(s, i, length)


Detailed Description

C API: UTF-32 macros.

This file defines macros to deal with UTF-32 code units and code points. Signatures and semantics are the same as for the similarly named macros in utf16.h. utf32.h is included by utf.h after unicode/umachine.h and some common definitions.

Definition in file utf32.h.


Define Documentation

#define UTF32_APPEND_CHAR_SAFE( s, i, length, c )
 

Initializer:

{ \
    if((uint32_t)(c)<=0x10ffff) { \
        (s)[(i)++]=(c); \
    } else   { \
        (s)[(i)++]=0xfffd; \
    } \
}

Definition at line 96 of file utf32.h.

#define UTF32_APPEND_CHAR_UNSAFE( s, i, c )
 

Initializer:

{ \
    (s)[(i)++]=(c); \
}

Definition at line 74 of file utf32.h.

#define UTF32_ARRAY_SIZE( size )   (size)
 

Definition at line 55 of file utf32.h.

#define UTF32_BACK_1_SAFE( s, start, i )
 

Initializer:

{ \
    --(i); \
}

Definition at line 141 of file utf32.h.

#define UTF32_BACK_1_UNSAFE( s, i )
 

Initializer:

{ \
    --(i); \
}

Definition at line 123 of file utf32.h.

#define UTF32_BACK_N_SAFE( s, start, i, n )
 

Initializer:

{ \
    (i)-=(n); \
    if((i)<(start)) { \
        (i)=(start); \
    } \
}

Definition at line 145 of file utf32.h.

#define UTF32_BACK_N_UNSAFE( s, i, n )
 

Initializer:

{ \
    (i)-=(n); \
}

Definition at line 127 of file utf32.h.

#define UTF32_CHAR_LENGTH( c )   1
 

Definition at line 51 of file utf32.h.

#define UTF32_FWD_1_SAFE( s, i, length )
 

Initializer:

{ \
    ++(i); \
}

Definition at line 104 of file utf32.h.

#define UTF32_FWD_1_UNSAFE( s, i )
 

Initializer:

{ \
    ++(i); \
}

Definition at line 78 of file utf32.h.

#define UTF32_FWD_N_SAFE( s, i, length, n )
 

Initializer:

{ \
    if(((i)+=(n))>(length)) { \
        (i)=(length); \
    } \
}

Definition at line 108 of file utf32.h.

#define UTF32_FWD_N_UNSAFE( s, i, n )
 

Initializer:

{ \
    (i)+=(n); \
}

Definition at line 82 of file utf32.h.

#define UTF32_GET_CHAR_SAFE( s, start, i, length, c, strict )
 

Initializer:

{ \
    (c)=(s)[i]; \
    if(!UTF32_IS_SAFE(c, strict)) { \
        (c)=UTF_ERROR_VALUE; \
    } \
}

Definition at line 61 of file utf32.h.

#define UTF32_GET_CHAR_UNSAFE( s, i, c )
 

Initializer:

{ \
    (c)=(s)[i]; \
}

Definition at line 57 of file utf32.h.

#define UTF32_IS_LEAD( uchar )   0
 

Definition at line 46 of file utf32.h.

#define UTF32_IS_SAFE( c, strict )
 

Initializer:

\
    ((uint32_t)(c)<=0x10ffff && \
     (!(strict) || !UTF_IS_SURROGATE(c) && ((c)&0xfffe)!=0xfffe))

Definition at line 32 of file utf32.h.

#define UTF32_IS_SINGLE( uchar )   1
 

Definition at line 45 of file utf32.h.

#define UTF32_IS_TRAIL( uchar )   0
 

Definition at line 47 of file utf32.h.

#define UTF32_MAX_CHAR_LENGTH   1
 

Definition at line 52 of file utf32.h.

#define UTF32_NEED_MULTIPLE_UCHAR( c )   0
 

Definition at line 50 of file utf32.h.

#define UTF32_NEXT_CHAR_SAFE( s, i, length, c, strict )
 

Initializer:

{ \
    (c)=(s)[(i)++]; \
    if(!UTF32_IS_SAFE(c, strict)) { \
        (c)=UTF_ERROR_VALUE; \
    } \
}

Definition at line 89 of file utf32.h.

#define UTF32_NEXT_CHAR_UNSAFE( s, i, c )
 

Initializer:

{ \
    (c)=(s)[(i)++]; \
}

Definition at line 70 of file utf32.h.

#define UTF32_PREV_CHAR_SAFE( s, start, i, c, strict )
 

Initializer:

{ \
    (c)=(s)[--(i)]; \
    if(!UTF32_IS_SAFE(c, strict)) { \
        (c)=UTF_ERROR_VALUE; \
    } \
}

Definition at line 134 of file utf32.h.

#define UTF32_PREV_CHAR_UNSAFE( s, i, c )
 

Initializer:

{ \
    (c)=(s)[--(i)]; \
}

Definition at line 119 of file utf32.h.

#define UTF32_SET_CHAR_LIMIT_SAFE( s, i, length )
 

Initializer:

{ \
}

Definition at line 152 of file utf32.h.

#define UTF32_SET_CHAR_LIMIT_UNSAFE( s, i )
 

Initializer:

{ \
}

Definition at line 131 of file utf32.h.

#define UTF32_SET_CHAR_START_SAFE( s, start, i )
 

Initializer:

{ \
}

Definition at line 114 of file utf32.h.

#define UTF32_SET_CHAR_START_UNSAFE( s, i )
 

Initializer:

{ \
}

Definition at line 86 of file utf32.h.


Generated at Fri Dec 15 12:12:59 2000 for ICU 1.7 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000