aboutsummaryrefslogtreecommitdiff
path: root/libXaw/src/Label.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-10-01 12:33:20 +0200
committermarha <marha@users.sourceforge.net>2013-10-01 12:33:20 +0200
commitbe0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779 (patch)
tree807b5640d1fedc88ddcda752f101ffdb3071092a /libXaw/src/Label.c
parent11b60c4ebaf348b01051bfff19f947b073028a99 (diff)
parent6dd755aa923291db2501cc5c22e409c41a70e3c1 (diff)
downloadvcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.tar.gz
vcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.tar.bz2
vcxsrv-be0d35a4a1b1dc5bde14d1b027f4f0cb58b5a779.zip
Merge remote-tracking branch 'origin/released'
* origin/released: Update following packages: Conflicts: X11/Xwinsock.h apps/xhost/xhost.c libXaw/src/Vendor.c libXfont/include/X11/fonts/bdfint.h libXfont/src/fontfile/catalogue.c
Diffstat (limited to 'libXaw/src/Label.c')
-rw-r--r--libXaw/src/Label.c65
1 files changed, 5 insertions, 60 deletions
diff --git a/libXaw/src/Label.c b/libXaw/src/Label.c
index 25a26a111..664bbc6b5 100644
--- a/libXaw/src/Label.c
+++ b/libXaw/src/Label.c
@@ -63,9 +63,6 @@ SOFTWARE.
#define MULTI_LINE_LABEL 32767
-#ifdef CRAY
-#define WORD64
-#endif
/*
* Class Methods
@@ -83,10 +80,6 @@ static Boolean XawLabelSetValues(Widget, Widget, Widget,
/*
* Prototypes
*/
-#ifdef WORD64
-static int _XawLabelWidth16(XFontStruct*, char*, int);
-static void _XawLabelDraw16(Display*, Drawable, GC, int, int, char*, int);
-#endif
static void compute_bitmap_offsets(LabelWidget);
static void GetGrayGC(LabelWidget);
static void GetNormalGC(LabelWidget);
@@ -281,54 +274,6 @@ XawLabelClassInitialize(void)
NULL, 0, XtCacheNone, NULL);
}
-#ifndef WORD64
-#define TXT16 XChar2b
-#else
-#define TXT16 char
-
-static XChar2b *buf2b;
-static int buf2blen = 0;
-
-static int
-_XawLabelWidth16(XFontStruct *fs, char *str, int n)
-{
- int i;
- XChar2b *ptr;
-
- if (n > buf2blen) {
- buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
- buf2blen = n;
- }
- for (ptr = buf2b, i = n; --i >= 0; ptr++) {
- ptr->byte1 = *str++;
- ptr->byte2 = *str++;
- }
-
- return (XTextWidth16(fs, buf2b, n));
-}
-
-static void
-_XawLabelDraw16(Display *dpy, Drawable d, GC gc, int x, int y,
- char *str, int n)
-{
- int i;
- XChar2b *ptr;
-
- if (n > buf2blen) {
- buf2b = (XChar2b *)XtRealloc((char *)buf2b, n * sizeof(XChar2b));
- buf2blen = n;
- }
- for (ptr = buf2b, i = n; --i >= 0; ptr++) {
- ptr->byte1 = *str++;
- ptr->byte2 = *str++;
- }
- XDrawString16(dpy, d, gc, x, y, buf2b, n);
-}
-
-#define XTextWidth16 _XawLabelWidth16
-#define XDrawString16 _XawLabelDraw16
-#endif /* WORD64 */
-
/*
* Calculate width and height of displayed text in pixels
*/
@@ -402,7 +347,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)
@@ -416,7 +361,7 @@ SetTextWidthAndHeight(LabelWidget lw)
int width = XTextWidth(fs, label, strlen(label));
if (lw->label.encoding)
- width = XTextWidth16(fs, (TXT16*)label, strlen(label) / 2);
+ width = XTextWidth16(fs, (XChar2b *)label, strlen(label) / 2);
else
width = XTextWidth(fs, label, strlen(label));
if (width > (int) lw->label.label_width)
@@ -427,7 +372,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 =
@@ -611,7 +556,7 @@ XawLabelRedisplay(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));
@@ -624,7 +569,7 @@ XawLabelRedisplay(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);