summaryrefslogtreecommitdiffstats
path: root/unix/tkUnix.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-08-10 22:02:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-08-10 22:02:21 (GMT)
commitc8d989f48e69bfff4d7cb7214f8f4539e303fd7c (patch)
tree9d4e60b064aa3377d392ff30035da3ba8ba121ae /unix/tkUnix.c
parentaac661624dd68998883977d90169ef67424e6b7e (diff)
downloadtk-c8d989f48e69bfff4d7cb7214f8f4539e303fd7c.zip
tk-c8d989f48e69bfff4d7cb7214f8f4539e303fd7c.tar.gz
tk-c8d989f48e69bfff4d7cb7214f8f4539e303fd7c.tar.bz2
Getting more systematic about style
Also start removing _ANSI_ARGS_; the core's required ANSI C for a while now Also fix [Bug 1252702]; size_t doesn't mix with Tcl_GetStringFromObj
Diffstat (limited to 'unix/tkUnix.c')
-rw-r--r--unix/tkUnix.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/unix/tkUnix.c b/unix/tkUnix.c
index 0f93e93..677569e 100644
--- a/unix/tkUnix.c
+++ b/unix/tkUnix.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnix.c,v 1.10 2005/06/02 10:08:07 rmax Exp $
+ * RCS: @(#) $Id: tkUnix.c,v 1.11 2005/08/10 22:02:22 dkf Exp $
*/
#include <tkInt.h>
@@ -115,8 +115,8 @@ Tk_UpdatePointer(tkwin, x, y, state)
*
* TkpBuildRegionFromAlphaData --
*
- * Set up a rectangle of the given region based on the supplied
- * alpha data.
+ * Set up a rectangle of the given region based on the supplied alpha
+ * data.
*
* Results:
* None
@@ -130,14 +130,14 @@ Tk_UpdatePointer(tkwin, x, y, state)
void
TkpBuildRegionFromAlphaData(region, x, y, width, height, dataPtr,
pixelStride, lineStride)
- TkRegion region;
- unsigned int x, y; /* Where in region to update. */
- unsigned int width, height; /* Size of rectangle to update. */
- unsigned char *dataPtr; /* Data to read from. */
- unsigned int pixelStride; /* num bytes from one piece of alpha
- * data to the next in the line. */
- unsigned int lineStride; /* num bytes from one line of alpha
- * data to the next line. */
+ TkRegion region; /* Region to be updated. */
+ unsigned int x, y; /* Where in region to update. */
+ unsigned int width, height; /* Size of rectangle to update. */
+ unsigned char *dataPtr; /* Data to read from. */
+ unsigned int pixelStride; /* Num bytes from one piece of alpha data to
+ * the next in the line. */
+ unsigned int lineStride; /* Num bytes from one line of alpha data to
+ * the next line. */
{
unsigned char *lineDataPtr;
unsigned int x1, y1, end;
@@ -146,13 +146,20 @@ TkpBuildRegionFromAlphaData(region, x, y, width, height, dataPtr,
for (y1 = 0; y1 < height; y1++) {
lineDataPtr = dataPtr;
for (x1 = 0; x1 < width; x1 = end) {
- /* search for first non-transparent pixel */
+ /*
+ * Search for first non-transparent pixel.
+ */
+
while ((x1 < width) && !*lineDataPtr) {
x1++;
lineDataPtr += pixelStride;
}
end = x1;
- /* search for first transparent pixel */
+
+ /*
+ * Search for first transparent pixel.
+ */
+
while ((end < width) && *lineDataPtr) {
end++;
lineDataPtr += pixelStride;