Lines Matching refs:length

41 #define AllocLocalBuf(length)	(length > BUFSIZ ? (char *)Xmalloc(length) : local_buf)
49 int length)
58 to_left = length;
59 ret = _XlcConvert(conv, (XPointer *) &from, &length, (XPointer *) &to,
61 if (ret != 0 || length > 0)
72 int length)
81 to_left = length;
82 ret = _XlcConvert(conv, (XPointer *) &from, &length, (XPointer *) &to,
84 if (ret != 0 || length > 0)
91 _XmbDefaultTextEscapement(XOC oc, _Xconst char *text, int length)
93 return XTextWidth(*oc->core.font_info.font_struct_list, text, length);
97 _XwcDefaultTextEscapement(XOC oc, _Xconst wchar_t *text, int length)
100 char *buf = AllocLocalBuf(length);
106 if (wcs_to_mbs(oc, buf, text, length) == False) {
111 ret = _XmbDefaultTextEscapement(oc, buf, length);
120 _Xutf8DefaultTextEscapement(XOC oc, _Xconst char *text, int length)
123 char *buf = AllocLocalBuf(length);
129 if (utf8_to_mbs(oc, buf, text, length) == False) {
134 ret = _XmbDefaultTextEscapement(oc, buf, length);
143 _XmbDefaultTextExtents(XOC oc, _Xconst char *text, int length,
149 XTextExtents(*oc->core.font_info.font_struct_list, text, length, &direction,
170 _XwcDefaultTextExtents(XOC oc, _Xconst wchar_t *text, int length,
174 char *buf = AllocLocalBuf(length);
180 if (wcs_to_mbs(oc, buf, text, length) == False) {
185 ret = _XmbDefaultTextExtents(oc, buf, length, overall_ink, overall_logical);
194 _Xutf8DefaultTextExtents(XOC oc, _Xconst char *text, int length,
198 char *buf = AllocLocalBuf(length);
204 if (utf8_to_mbs(oc, buf, text, length) == False) {
209 ret = _XmbDefaultTextExtents(oc, buf, length, overall_ink, overall_logical);
218 _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length,
228 if (buf_size < length)
236 while (length-- > 0) {
288 _XwcDefaultTextPerCharExtents(XOC oc, _Xconst wchar_t *text, int length,
295 char *buf = AllocLocalBuf(length);
301 if (wcs_to_mbs(oc, buf, text, length) == False) {
306 ret = _XmbDefaultTextPerCharExtents(oc, buf, length, ink_buf, logical_buf,
317 _Xutf8DefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length,
324 char *buf = AllocLocalBuf(length);
330 if (utf8_to_mbs(oc, buf, text, length) == False) {
335 ret = _XmbDefaultTextPerCharExtents(oc, buf, length, ink_buf, logical_buf,
347 _Xconst char *text, int length)
352 XDrawString(dpy, d, gc, x, y, text, length);
354 return XTextWidth(font, text, length);
359 _Xconst wchar_t *text, int length)
362 char *buf = AllocLocalBuf(length);
368 if (wcs_to_mbs(oc, buf, text, length) == False) {
373 ret = _XmbDefaultDrawString(dpy, d, oc, gc, x, y, buf, length);
383 _Xconst char *text, int length)
386 char *buf = AllocLocalBuf(length);
392 if (utf8_to_mbs(oc, buf, text, length) == False) {
397 ret = _XmbDefaultDrawString(dpy, d, oc, gc, x, y, buf, length);
407 int y, _Xconst char *text, int length)
410 XDrawImageString(dpy, d, gc, x, y, text, length);
415 int y, _Xconst wchar_t *text, int length)
418 char *buf = AllocLocalBuf(length);
423 if (wcs_to_mbs(oc, buf, text, length) == False)
426 _XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, buf, length);
434 int y, _Xconst char *text, int length)
437 char *buf = AllocLocalBuf(length);
442 if (utf8_to_mbs(oc, buf, text, length) == False)
445 _XmbDefaultDrawImageString(dpy, d, oc, gc, x, y, buf, length);