Ejemplo n.º 1
0
static FcBool
FcNameUnparseString (FcStrBuf	    *buf, 
		     const FcChar8  *string,
		     const FcChar8  *escape)
{
    FcChar8 c;
    while ((c = *string++))
    {
	if (escape && strchr ((char *) escape, (char) c))
	{
	    if (!FcStrBufChar (buf, escape[0]))
		return FcFalse;
	}
	if (!FcStrBufChar (buf, c))
	    return FcFalse;
    }
    return FcTrue;
}
Ejemplo n.º 2
0
void FcLangSetPrint(const FcLangSet *ls) {
    FcStrBuf buf;
    FcChar8 init_buf[1024];

    FcStrBufInit(&buf, init_buf, sizeof(init_buf));
    if (FcNameUnparseLangSet(&buf, ls) && FcStrBufChar(&buf, '\0'))
        printf("%s", buf.buf);
    else
        printf("langset (alloc error)");
    FcStrBufDestroy(&buf);
}