diff --git a/c/xlib/text.c b/c/xlib/text.c index 1ef05d8..3e8d8df 100644 --- a/c/xlib/text.c +++ b/c/xlib/text.c @@ -1,5 +1,6 @@ #include "xlib.h" #include "scheme48.h" +#include extern XDrawText(), XDrawText16(); @@ -10,12 +11,13 @@ extern XDrawText(), XDrawText16(); */ -s48_value scx_Text_Width(s48_value Xfontstruct, s48_value text, s48_value format){ +s48_value scx_Text_Width(s48_value Xfontstruct, s48_value text, + s48_value format){ char* s; XChar2b* s2; XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct); int len = (int)S48_VECTOR_LENGTH(text), i, tmp; - if (s48_extract_integer(format) == 2){ + if (s48_extract_integer(format) == 1){ for (i = 0; i < len; i++){ tmp = (int)s48_extract_integer(S48_VECTOR_REF(text, i)); s2[i].byte1 = (tmp >> 8) & 0xff; @@ -40,7 +42,7 @@ s48_value scx_Extents_Text (s48_value Xfontstruct, s48_value text, XFontStruct* font = SCX_EXTRACT_FONTSTRUCT(Xfontstruct); XCharStruct CI; int len = (int)S48_VECTOR_LENGTH(text), i, tmp, dir, fasc, fdesc; - if (s48_extract_integer(format) == 2){ + if (s48_extract_integer(format) == 1){ for (i = 0; i < len; i++){ tmp = (int)s48_extract_integer(S48_VECTOR_REF(text, i)); s2[i].byte1 = (tmp >> 8) & 0xff; diff --git a/scheme/xlib/text.scm b/scheme/xlib/text.scm index b96a883..a6325e7 100644 --- a/scheme/xlib/text.scm +++ b/scheme/xlib/text.scm @@ -101,6 +101,7 @@ (define (extents-intern id) (lambda (font text . format) + (display "-----------------\n") (let ((format (if (null? format) '1-byte (car format)))) (%extents-text (font-Xfontstruct font) (text->internal-text text format)