diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-31 14:39:04 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-31 14:39:04 (GMT) |
commit | 57697b5b22a5851bca41ba3ec058f1de355ba5dc (patch) | |
tree | 6faf126294b1235b3307dcc394cab895489ceef6 /generic/tkImgPhoto.c | |
parent | d4a4017589dd52fa8e9667df9d754fd62abd6bed (diff) | |
download | tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.zip tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.gz tk-57697b5b22a5851bca41ba3ec058f1de355ba5dc.tar.bz2 |
minor improvements to flag handling
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 559268a..ce160a4 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -687,7 +687,7 @@ ImgPhotoCmd( * Fill in default values for unspecified parameters. */ - if (((options.options & OPT_FROM) == 0) || (options.fromX2 < 0)) { + if (!(options.options & OPT_FROM) || (options.fromX2 < 0)) { options.fromX2 = masterPtr->width; options.fromY2 = masterPtr->height; } @@ -833,7 +833,7 @@ ImgPhotoCmd( &imageHeight, &oldformat) == TCL_OK) { Tcl_Obj *format, *data; - if (((options.options & OPT_TO) == 0) || (options.toX2 < 0)) { + if (!(options.options & OPT_TO) || (options.toX2 < 0)) { options.toX2 = options.toX + imageWidth; options.toY2 = options.toY + imageHeight; } @@ -1056,7 +1056,7 @@ ImgPhotoCmd( Tcl_Close(NULL, chan); return TCL_ERROR; } - if (((options.options & OPT_FROM) == 0) || (options.fromX2 < 0)) { + if (!(options.options & OPT_FROM) || (options.fromX2 < 0)) { width = imageWidth - options.fromX; height = imageHeight - options.fromY; } else { @@ -1521,7 +1521,7 @@ ParseSubcommandOptions( * in the interpreter and return. */ - if ((allowedOptions & bit) == 0) { + if (!(allowedOptions & bit)) { goto unknownOrAmbiguousOption; } |