diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-06 00:07:23 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-07-06 00:07:23 -0700 |
commit | 4cc04b8ba83f64aa142fdedf632f55fbe429d763 (patch) | |
tree | b6bace81d82f363473bce99b9764a2e436bedeb4 /ULabel.c | |
parent | b655a65ff7915b0c55a214b3a23b7f0fa1a39f44 (diff) |
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 <alan.coopersmith@oracle.com>
Diffstat (limited to 'ULabel.c')
-rw-r--r-- | ULabel.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -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); |