diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-18 21:54:50 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-18 21:54:50 (GMT) |
commit | 416295a661f5c8f30dfe0751b5618c6a51173034 (patch) | |
tree | bfb19584bd766c6ab28ecf667323334f9aa4958b /macosx/tkMacOSXDraw.c | |
parent | ef0195454b1d958bcad88274c0246d0ac81b781c (diff) | |
download | tk-416295a661f5c8f30dfe0751b5618c6a51173034.zip tk-416295a661f5c8f30dfe0751b5618c6a51173034.tar.gz tk-416295a661f5c8f30dfe0751b5618c6a51173034.tar.bz2 |
Fix signatures of many X11 functions on MacOSX: They have an "int" return value, not "void", which allows to check for errors.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r-- | macosx/tkMacOSXDraw.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c index 1793b64..a8399ef 100644 --- a/macosx/tkMacOSXDraw.c +++ b/macosx/tkMacOSXDraw.c @@ -906,7 +906,7 @@ XFillPolygon( *---------------------------------------------------------------------- */ -void +int XDrawRectangle( Display *display, /* Display. */ Drawable d, /* Draw on this. */ @@ -920,12 +920,12 @@ XDrawRectangle( int lw = gc->line_width; if (width == 0 || height == 0) { - return; + return BadDrawable; } display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { - return; + return BadDrawable; } if (dc.context) { CGRect rect; @@ -937,6 +937,7 @@ XDrawRectangle( CGContextStrokeRect(dc.context, rect); } TkMacOSXRestoreDrawingContext(&dc); + return Success; } #ifdef TK_MACOSXDRAW_UNUSED @@ -1266,7 +1267,7 @@ XDrawArcs( *---------------------------------------------------------------------- */ -void +int XFillArc( Display *display, /* Display. */ Drawable d, /* Draw on this. */ @@ -1282,12 +1283,12 @@ XFillArc( int lw = gc->line_width; if (width == 0 || height == 0 || angle2 == 0) { - return; + return BadDrawable; } display->request++; if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) { - return; + return BadDrawable; } if (dc.context) { CGRect rect; |