From 687d44b6eaa3c64a12af9bbd557b401419b208eb Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 29 Jul 2016 00:44:38 +0200 Subject: update src files *[ch] to libX11 1.3.4 --- nx-X11/lib/X11/PolyTxt16.c | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'nx-X11/lib/X11/PolyTxt16.c') 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) -- cgit v1.2.3