From 24662485317090da5c58085403f4c7ec0bde6052 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 6 Jul 2013 00:17:52 -0700 Subject: Replace TXT16 with XChar2b inline No longer need #define to substitute it now that we no longer set it to a different type on CRAY systems. Signed-off-by: Alan Coopersmith --- src/Label.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Label.c b/src/Label.c index dac1f3a..ccaa060 100644 --- a/src/Label.c +++ b/src/Label.c @@ -194,10 +194,6 @@ ClassInitialize(void) (XtConvertArgList)NULL, 0 ); } - -#define TXT16 XChar2b - - /* * Calculate width and height of displayed text in pixels */ @@ -274,7 +270,7 @@ SetTextWidthAndHeight(LabelWidget lw) int width; if (lw->label.encoding) - width = XTextWidth16(fs, (TXT16*)label, (int)(nl - label)/2); + width = XTextWidth16(fs, (XChar2b *)label, (int)(nl - label)/2); else width = XTextWidth(fs, label, (int)(nl - label)); if (width > (int)lw->label.label_width) @@ -288,7 +284,7 @@ SetTextWidthAndHeight(LabelWidget lw) int width = XTextWidth(fs, label, strlen(label)); if (lw->label.encoding) - width = XTextWidth16(fs, (TXT16*)label, (int)strlen(label)/2); + width = XTextWidth16(fs, (XChar2b *)label, (int)strlen(label)/2); else width = XTextWidth(fs, label, strlen(label)); if (width > (int) lw->label.label_width) @@ -298,7 +294,7 @@ SetTextWidthAndHeight(LabelWidget lw) lw->label.label_len = strlen(lw->label.label); if (lw->label.encoding) lw->label.label_width = - XTextWidth16(fs, (TXT16*)lw->label.label, + XTextWidth16(fs, (XChar2b *)lw->label.label, (int) lw->label.label_len/2); else lw->label.label_width = @@ -543,7 +539,7 @@ Redisplay(Widget gw, XEvent *event, Region region) if (w->label.encoding) XDrawString16(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, - (TXT16*)label, (int)(nl - label)/2); + (XChar2b *)label, (int)(nl - label)/2); else XDrawString(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, label, (int)(nl - label)); @@ -556,7 +552,7 @@ Redisplay(Widget gw, XEvent *event, Region region) if (len) { if (w->label.encoding) XDrawString16(XtDisplay(gw), XtWindow(gw), gc, - w->label.label_x, y, (TXT16*)label, len/2); + w->label.label_x, y, (XChar2b *)label, len/2); else XDrawString(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, label, len); -- cgit v1.2.3