aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/PolyTxt.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11/PolyTxt.c')
-rw-r--r--nx-X11/lib/X11/PolyTxt.c49
1 files changed, 25 insertions, 24 deletions
diff --git a/nx-X11/lib/X11/PolyTxt.c b/nx-X11/lib/X11/PolyTxt.c
index 39beefe92..2f43c43d3 100644
--- a/nx-X11/lib/X11/PolyTxt.c
+++ b/nx-X11/lib/X11/PolyTxt.c
@@ -30,14 +30,15 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
-XDrawText(dpy, d, gc, x, y, items, nitems)
- register Display *dpy;
- Drawable d;
- GC gc;
- int x, y;
- XTextItem *items;
- int nitems;
-{
+XDrawText(
+ register Display *dpy,
+ Drawable d,
+ GC gc,
+ int x,
+ int y,
+ XTextItem *items,
+ int nitems)
+{
register int i;
register XTextItem *item;
int length = 0;
@@ -78,11 +79,11 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
req->length += (length + 3)>>2; /* convert to number of 32-bit words */
- /*
+ /*
* 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)
@@ -120,9 +121,9 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
{
int nb = SIZEOF(xTextElt);
- BufAlloc (char *, tbuf, nb);
+ BufAlloc (char *, tbuf, nb);
*tbuf = 0; /* elt->len */
- if (PartialDelta > 0 )
+ if (PartialDelta > 0 )
{
*(tbuf+1) = 127; /* elt->delta */
PartialDelta = PartialDelta - 127;
@@ -136,7 +137,7 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
}
if (PartialDelta)
{
- BufAlloc (char *, tbuf , nbytes);
+ BufAlloc (char *, tbuf , nbytes);
*tbuf = 0; /* elt->len */
*(tbuf+1) = PartialDelta; /* elt->delta */
}
@@ -147,9 +148,9 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
{
FirstTimeThrough = False;
if (!item->delta)
- {
+ {
nbytes += SIZEOF(xTextElt);
- BufAlloc (char *, tbuf, nbytes);
+ BufAlloc (char *, tbuf, nbytes);
*(tbuf+1) = 0; /* elt->delta */
}
else
@@ -178,9 +179,9 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
{
FirstTimeThrough = False;
if (!item->delta)
- {
+ {
nbytes += SIZEOF(xTextElt);
- BufAlloc (char *, tbuf, nbytes);
+ BufAlloc (char *, tbuf, nbytes);
*(tbuf+1) = 0; /* elt->delta */
}
else
@@ -192,7 +193,7 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
else
{
nbytes += SIZEOF(xTextElt);
- BufAlloc (char *, tbuf, nbytes);
+ BufAlloc (char *, tbuf, nbytes);
*(tbuf+1) = 0; /* elt->delta */
}
*tbuf = PartialNChars; /* elt->len */
@@ -206,23 +207,23 @@ XDrawText(dpy, d, gc, x, y, items, nitems)
if (length &= 3) {
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)