summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-06 00:17:52 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-06 00:17:52 -0700
commit24662485317090da5c58085403f4c7ec0bde6052 (patch)
tree73e739428f34a0b3560416664e7a9c61ae4c5d74 /src
parent487144639c9a643e6d01a1a4d03c009af34e1903 (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 'src')
-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);