aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/PutImage.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
commit051d521f6e20761ba6831cecd91883da960fa931 (patch)
treeb28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/PutImage.c
parent6dce607bad8711dd06a5a7b69ad1930386b4123b (diff)
parentb8de7bf654929c823080b211aeac56cd213f5a32 (diff)
downloadnx-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/PutImage.c')
-rw-r--r--nx-X11/lib/X11/PutImage.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/nx-X11/lib/X11/PutImage.c b/nx-X11/lib/X11/PutImage.c
index 9e461cb18..6dad4f13a 100644
--- a/nx-X11/lib/X11/PutImage.c
+++ b/nx-X11/lib/X11/PutImage.c
@@ -682,7 +682,7 @@ SendXYImage(
if ((dpy->bufptr + length) > dpy->bufmax) {
if ((buf = _XAllocScratch(dpy, (unsigned long) (length))) == NULL) {
UnGetReq(PutImage);
- return;
+ return;
}
}
else
@@ -870,7 +870,7 @@ PutImageRequest(
SendZImage(dpy, req, image, req_xoffset, req_yoffset,
dest_bits_per_pixel, dest_scanline_pad);
}
-
+
static void
PutSubImage (
register Display *dpy,
@@ -889,7 +889,7 @@ PutSubImage (
if ((req_width == 0) || (req_height == 0))
return;
-
+
Available = ((65536 < dpy->max_request_size) ? (65536 << 2)
: (dpy->max_request_size << 2))
- SIZEOF(xPutImageReq);
@@ -905,7 +905,7 @@ PutSubImage (
}
if ((BytesPerRow * req_height) <= Available) {
- PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
+ PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
req_width, req_height,
dest_bits_per_pixel, dest_scanline_pad);
} else if (req_height > 1) {
@@ -914,11 +914,11 @@ PutSubImage (
if (SubImageHeight == 0)
SubImageHeight = 1;
- PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
+ PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
req_width, (unsigned int) SubImageHeight,
dest_bits_per_pixel, dest_scanline_pad);
- PutSubImage(dpy, d, gc, image, req_xoffset,
+ PutSubImage(dpy, d, gc, image, req_xoffset,
req_yoffset + SubImageHeight, x, y + SubImageHeight,
req_width, req_height - SubImageHeight,
dest_bits_per_pixel, dest_scanline_pad);
@@ -926,11 +926,11 @@ PutSubImage (
int SubImageWidth = (((Available << 3) / dest_scanline_pad)
* dest_scanline_pad) - left_pad;
- PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
+ PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y,
(unsigned int) SubImageWidth, 1,
dest_bits_per_pixel, dest_scanline_pad);
- PutSubImage(dpy, d, gc, image, req_xoffset + SubImageWidth,
+ PutSubImage(dpy, d, gc, image, req_xoffset + SubImageWidth,
req_yoffset, x + SubImageWidth, y,
req_width - SubImageWidth, 1,
dest_bits_per_pixel, dest_scanline_pad);
@@ -939,15 +939,17 @@ PutSubImage (
int
-XPutImage (dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width,
- req_height)
- register Display *dpy;
- Drawable d;
- GC gc;
- register XImage *image;
- int x, y;
- unsigned int req_width, req_height;
- int req_xoffset, req_yoffset;
+XPutImage (
+ register Display *dpy,
+ Drawable d,
+ GC gc,
+ register XImage *image,
+ int req_xoffset,
+ int req_yoffset,
+ int x,
+ int y,
+ unsigned int req_width,
+ unsigned int req_height)
{
long width = req_width;