struct graphemes -> uiprivGraphemes. Also deleted OLD_uipriv.h now that that one is settled.
This commit is contained in:
parent
01d6422664
commit
8e2004cf67
|
@ -1,3 +0,0 @@
|
|||
|
||||
// OS-specific text.* files
|
||||
extern int uiprivStricmp(const char *a, const char *b);
|
|
@ -18,7 +18,7 @@ struct uiAttributedString {
|
|||
size_t *u16tou8;
|
||||
|
||||
// this is lazily created to keep things from getting *too* slow
|
||||
struct graphemes *graphemes;
|
||||
uiprivGraphemes *graphemes;
|
||||
};
|
||||
|
||||
static void resize(uiAttributedString *s, size_t u8, size_t u16)
|
||||
|
|
|
@ -28,10 +28,11 @@ extern size_t *uiprivAttributedStringCopyUTF8ToUTF16Table(const uiAttributedStri
|
|||
extern size_t *uiprivAttributedStringCopyUTF16ToUTF8Table(const uiAttributedString *s, size_t *n);
|
||||
|
||||
// per-OS graphemes.c/graphemes.cpp/graphemes.m/etc.
|
||||
struct graphemes {
|
||||
typedef struct uiprivGraphemes uiprivGraphemes;
|
||||
struct uiprivGraphemes {
|
||||
size_t len;
|
||||
size_t *pointsToGraphemes;
|
||||
size_t *graphemesToPoints;
|
||||
};
|
||||
extern int uiprivGraphemesTakesUTF16(void);
|
||||
extern struct graphemes *uiprivNewGraphemes(void *s, size_t len);
|
||||
extern uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len);
|
||||
|
|
|
@ -10,16 +10,16 @@ int uiprivGraphemesTakesUTF16(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct graphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
{
|
||||
struct graphemes *g;
|
||||
uiprivGraphemes *g;
|
||||
UniChar *str = (UniChar *) s;
|
||||
CFStringRef cfstr;
|
||||
size_t ppos, gpos;
|
||||
CFRange range;
|
||||
size_t i;
|
||||
|
||||
g = uiprivNew(struct graphemes);
|
||||
g = uiprivNew(uiprivGraphemes);
|
||||
|
||||
cfstr = CFStringCreateWithCharactersNoCopy(NULL, str, len, kCFAllocatorNull);
|
||||
if (cfstr == NULL) {
|
||||
|
|
|
@ -7,16 +7,16 @@ int uiprivGraphemesTakesUTF16(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct graphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
{
|
||||
struct graphemes *g;
|
||||
uiprivGraphemes *g;
|
||||
char *text = (char *) s;
|
||||
size_t lenchars;
|
||||
PangoLogAttr *logattrs;
|
||||
size_t i;
|
||||
size_t *op;
|
||||
|
||||
g = uiprivNew(struct graphemes);
|
||||
g = uiprivNew(uiprivGraphemes);
|
||||
|
||||
// TODO see if we can use the utf routines
|
||||
lenchars = g_utf8_strlen(text, -1);
|
||||
|
|
|
@ -11,13 +11,13 @@ int uiprivGraphemesTakesUTF16(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
struct graphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
uiprivGraphemes *uiprivNewGraphemes(void *s, size_t len)
|
||||
{
|
||||
struct graphemes *g;
|
||||
uiprivGraphemes *g;
|
||||
WCHAR *str;
|
||||
size_t *pPTG, *pGTP;
|
||||
|
||||
g = uiprivNew(struct graphemes);
|
||||
g = uiprivNew(uiprivGraphemes);
|
||||
|
||||
g->len = 0;
|
||||
str = (WCHAR *) s;
|
||||
|
|
Loading…
Reference in New Issue