summaryrefslogtreecommitdiff
path: root/src/Label.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Label.c')
-rw-r--r--src/Label.c14
1 files changed, 5 insertions, 9 deletions
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);