summaryrefslogtreecommitdiff
path: root/ULabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'ULabel.c')
-rw-r--r--ULabel.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ULabel.c b/ULabel.c
index 778e5e4..0a524f3 100644
--- a/ULabel.c
+++ b/ULabel.c
@@ -176,10 +176,6 @@ static void ClassInitialize(void)
static XChar2b *buf2b;
static int buf2blen = 0;
-
-#define TXT16 XChar2b
-
-
static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
int x, int y, char *str, int n)
{
@@ -331,7 +327,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
int width;
if (lw->label.encoding == XawTextEncodingChar2b)
- width = XTextWidth16(fs, (TXT16*)label, (int)(nl - label)/2);
+ width = XTextWidth16(fs, (XChar2b *)label, (int)(nl - label)/2);
else if (lw->label.encoding == XawTextEncodingUCS)
width = XTextWidthUCS(fs, label, nl - label);
else
@@ -347,7 +343,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
int width;
if (lw->label.encoding == XawTextEncodingChar2b)
- width = XTextWidth16(fs, (TXT16*)label, (int)strlen(label)/2);
+ width = XTextWidth16(fs, (XChar2b *)label, (int)strlen(label)/2);
else if (lw->label.encoding == XawTextEncodingUCS)
width = XTextWidthUCS(fs, label, strlen(label));
else
@@ -359,7 +355,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
lw->label.label_len = strlen(lw->label.label);
if (lw->label.encoding == XawTextEncodingChar2b)
lw->label.label_width =
- XTextWidth16(fs, (TXT16*)lw->label.label,
+ XTextWidth16(fs, (XChar2b *)lw->label.label,
(int) lw->label.label_len/2);
else if (lw->label.encoding == XawTextEncodingUCS)
lw->label.label_width = XTextWidthUCS(fs, lw->label.label,
@@ -565,7 +561,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region)
if (w->label.encoding == XawTextEncodingChar2b)
XDrawString16(XtDisplay(gw), XtWindow(gw), gc,
w->label.label_x, y,
- (TXT16*)label, (int)(nl - label)/2);
+ (XChar2b *)label, (int)(nl - label)/2);
else if (w->label.encoding == XawTextEncodingUCS)
XDrawStringUCS(XtDisplay(gw), XtWindow(gw), gc,
w->label.label_x, y, label, (int)(nl - label));
@@ -581,7 +577,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region)
if (len) {
if (w->label.encoding == XawTextEncodingChar2b)
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 if (w->label.encoding == XawTextEncodingUCS)
XDrawStringUCS(XtDisplay(gw), XtWindow(gw), gc,
w->label.label_x, y, label, len);