diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-07-22 08:58:33 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-04-12 11:08:41 +1000 |
commit | decc44349ba66eb82c2ed575e60e80c2c827633d (patch) | |
tree | 6e0bbd55e866d2d04c2a31ff4e9c854538f640d2 | |
parent | 84648fda0f78dc0249bba7338f23526807e1f1d8 (diff) |
Correct XShm return values.
XShmAttach, XShmDetach, XShmPutImage do not return a Status but 0 or 1.
Though the man section for XShmAttach says "if all goes well, you will get a
non-zero status, back" this is counter to the usage of Status in Xlib
itself where 0 means Success and no-zero specifies the specific error.
XShmPixmapFormat does not return a Status but the pixmap format or 0 on
failure.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r-- | include/X11/extensions/XShm.h | 8 | ||||
-rw-r--r-- | man/XShm.man | 10 | ||||
-rw-r--r-- | src/XShm.c | 8 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/X11/extensions/XShm.h b/include/X11/extensions/XShm.h index af1baea..23f0651 100644 --- a/include/X11/extensions/XShm.h +++ b/include/X11/extensions/XShm.h @@ -75,17 +75,17 @@ int XShmPixmapFormat( Display* /* dpy */ ); -Status XShmAttach( +Bool XShmAttach( Display* /* dpy */, XShmSegmentInfo* /* shminfo */ ); -Status XShmDetach( +Bool XShmDetach( Display* /* dpy */, XShmSegmentInfo* /* shminfo */ ); -Status XShmPutImage( +Bool XShmPutImage( Display* /* dpy */, Drawable /* d */, GC /* gc */, @@ -99,7 +99,7 @@ Status XShmPutImage( Bool /* send_event */ ); -Status XShmGetImage( +Bool XShmGetImage( Display* /* dpy */, Drawable /* d */, XImage* /* image */, diff --git a/man/XShm.man b/man/XShm.man index 191dfad..06284f0 100644 --- a/man/XShm.man +++ b/man/XShm.man @@ -70,14 +70,14 @@ Bool XShmQueryVersion( int *major, *minor; Bool *pixmaps); .LP -Status XShmPixmapFormat( +int XShmPixmapFormat( Display *display); .LP -Status XShmAttach( +Bool XShmAttach( Display *display; XShmSegmentInfo *shminfo); .LP -Status XShmDetach( +Bool XShmDetach( Display *display; XShmSegmentInfo *shminfo); @@ -91,7 +91,7 @@ XImage *XShmCreateImage ( XShmSegmentInfo *shminfo; unsigned int width, height); .LP -Status XShmPutImage( +Bool XShmPutImage( Display *display; Drawable d; GC gc; @@ -100,7 +100,7 @@ Status XShmPutImage( unsigned int width, height; bool send_event); .LP -Status XShmGetImage ( +Bool XShmGetImage ( Display *display; Drawable d; XImage *image; @@ -223,7 +223,7 @@ int XShmPixmapFormat(Display *dpy) } -Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) +Bool XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) { XExtDisplayInfo *info = find_display (dpy); register xShmAttachReq *req; @@ -243,7 +243,7 @@ Status XShmAttach(Display *dpy, XShmSegmentInfo *shminfo) } -Status XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) +Bool XShmDetach(Display *dpy, XShmSegmentInfo *shminfo) { XExtDisplayInfo *info = find_display (dpy); register xShmDetachReq *req; @@ -312,7 +312,7 @@ XImage *XShmCreateImage ( return image; } -Status XShmPutImage ( +Bool XShmPutImage ( register Display *dpy, Drawable d, GC gc, @@ -354,7 +354,7 @@ Status XShmPutImage ( } -Status XShmGetImage( +Bool XShmGetImage( register Display *dpy, Drawable d, XImage *image, |