Example #1
0
char* fakeCString(const wchar_t *u)
{
    char *s, *t;
    unsigned int len;

    if(u == NULL)
      return NULL;

    len = uStrLen(u) + 1;
    t = s = (char*)malloc(len+1);
    while (*u) {
	if (*u == (wchar_t)0x2028)
	    *t = '\n';
	else if (*u == (wchar_t)0x2029)
	    *t = '\r';
	else
	    *t = (char)*u;
	u++; t++;
	}
    *t = 0;
    return s;
}
Example #2
0
void setVObjectUStringZValue(VObject *o, const wchar_t *s)
{
    USTRINGZ_VALUE_OF(o) = (wchar_t*) dupStr((char*)s,(unsigned)(uStrLen(s)+1)*2);
    VALUE_TYPE(o) = VCVT_USTRINGZ;
}
Example #3
0
void setVObjectUStringZValue(VObject *o, const wchar_t *s)
{
    size_t size = (size_t)((uStrLen(s)+1)*sizeof(wchar_t));
    USTRINGZ_VALUE_OF(o) = (wchar_t*) dupStr((char*)s,size);
    VALUE_TYPE(o) = VCVT_USTRINGZ;
}