diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-10-12 08:32:04 +0200 |
commit | 051d521f6e20761ba6831cecd91883da960fa931 (patch) | |
tree | b28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/PolyTxt16.c | |
parent | 6dce607bad8711dd06a5a7b69ad1930386b4123b (diff) | |
parent | b8de7bf654929c823080b211aeac56cd213f5a32 (diff) | |
download | nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.gz nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.bz2 nx-libs-051d521f6e20761ba6831cecd91883da960fa931.zip |
Merge branch 'uli42-pr/upgrade_libX11' into 3.6.x
Attributes GH PR #214: https://github.com/ArcticaProject/nx-libs/pull/214
Fixes ArcticaProject/nx-libs#157.
Diffstat (limited to 'nx-X11/lib/X11/PolyTxt16.c')
-rw-r--r-- | nx-X11/lib/X11/PolyTxt16.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/nx-X11/lib/X11/PolyTxt16.c b/nx-X11/lib/X11/PolyTxt16.c index 28aa9adbd..6c7cc49ec 100644 --- a/nx-X11/lib/X11/PolyTxt16.c +++ b/nx-X11/lib/X11/PolyTxt16.c @@ -30,14 +30,15 @@ in this Software without prior written authorization from The Open Group. #include "Xlibint.h" int -XDrawText16(dpy, d, gc, x, y, items, nitems) - register Display *dpy; - Drawable d; - GC gc; - int x, y; - XTextItem16 *items; - int nitems; -{ +XDrawText16( + register Display *dpy, + Drawable d, + GC gc, + int x, + int y, + XTextItem16 *items, + int nitems) +{ register int i; register XTextItem16 *item; int length = 0; @@ -82,7 +83,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) * If the entire request does not fit into the remaining space in the * buffer, flush the buffer first. If the request does fit into the * empty buffer, then we won't have to flush it at the end to keep - * the buffer 32-bit aligned. + * the buffer 32-bit aligned. */ if (dpy->bufptr + length > dpy->bufmax) @@ -119,9 +120,9 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) { int nb = SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nb); + BufAlloc (xTextElt *, elt, nb); elt->len = 0; - if (PartialDelta > 0 ) + if (PartialDelta > 0 ) { elt->delta = 127; PartialDelta = PartialDelta - 127; @@ -134,7 +135,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) } if (PartialDelta) { - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->len = 0; elt->delta = PartialDelta; } @@ -145,9 +146,9 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } else @@ -179,9 +180,9 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } else @@ -196,7 +197,7 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) else { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } elt->len = PartialNChars; @@ -214,21 +215,21 @@ XDrawText16(dpy, d, gc, x, y, items, nitems) char *pad; /* * BufAlloc is a macro that uses its last argument more than - * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" + * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" */ length = 4 - length; BufAlloc (char *, pad, length); - /* + /* * if there are 3 bytes of padding, the first byte MUST be 0 - * so the pad bytes aren't mistaken for a final xTextElt + * so the pad bytes aren't mistaken for a final xTextElt */ *pad = 0; } - /* + /* * If the buffer pointer is not now pointing to a 32-bit boundary, * we must flush the buffer so that it does point to a 32-bit boundary - * at the end of this routine. + * at the end of this routine. */ if ((dpy->bufptr - dpy->buffer) & 3) |