The R Project SVN R-packages

Rev

Rev 7747 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7747 Rev 8509
Line 41... Line 41...
41
 
41
 
42
#include "ConvertUTF.h"
42
#include "ConvertUTF.h"
43
#ifdef CVTUTF_DEBUG
43
#ifdef CVTUTF_DEBUG
44
#include <stdio.h>
44
#include <stdio.h>
45
#endif
45
#endif
-
 
46
#include <stdbool.h>
46
 
47
 
47
static const int halfShift  = 10; /* used for shifting by 10 bits */
48
static const int halfShift  = 10; /* used for shifting by 10 bits */
48
 
49
 
49
static const UTF32 halfBase = 0x0010000UL;
50
static const UTF32 halfBase = 0x0010000UL;
50
static const UTF32 halfMask = 0x3FFUL;
51
static const UTF32 halfMask = 0x3FFUL;
51
 
52
 
52
#define UNI_SUR_HIGH_START  (UTF32)0xD800
53
#define UNI_SUR_HIGH_START  (UTF32)0xD800
53
#define UNI_SUR_HIGH_END    (UTF32)0xDBFF
54
#define UNI_SUR_HIGH_END    (UTF32)0xDBFF
54
#define UNI_SUR_LOW_START   (UTF32)0xDC00
55
#define UNI_SUR_LOW_START   (UTF32)0xDC00
55
#define UNI_SUR_LOW_END     (UTF32)0xDFFF
56
#define UNI_SUR_LOW_END     (UTF32)0xDFFF
-
 
57
/*
56
#define false	   0
58
#define false	   0
57
#define true	    1
59
#define true	   1
-
 
60
*/
58
 
61
 
59
/* --------------------------------------------------------------------- */
62
/* --------------------------------------------------------------------- */
60
 
63
 
61
ConversionResult ConvertUTF32toUTF16 (
64
ConversionResult ConvertUTF32toUTF16 (
62
	const UTF32** sourceStart, const UTF32* sourceEnd, 
65
	const UTF32** sourceStart, const UTF32* sourceEnd,