summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2006-09-25 15:02:53 (GMT)
committerdkf <dkf@noemail.net>2006-09-25 15:02:53 (GMT)
commitb21c9faa1729b99dabcd2e4e518fe2c2c10e0e85 (patch)
tree6968a0fe768989212c3692264276b30eea430a8c
parent63ed8f311c9da84d864414d0cdcc6bc7fa2e9faf (diff)
downloadtcl-b21c9faa1729b99dabcd2e4e518fe2c2c10e0e85.zip
tcl-b21c9faa1729b99dabcd2e4e518fe2c2c10e0e85.tar.gz
tcl-b21c9faa1729b99dabcd2e4e518fe2c2c10e0e85.tar.bz2
Minor change: Improved code style
FossilOrigin-Name: bf0b0d3463c6702f1731c3e7589b6fd461e040e6
-rw-r--r--generic/tclNotify.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/generic/tclNotify.c b/generic/tclNotify.c
index 87c1ead..06781d9 100644
--- a/generic/tclNotify.c
+++ b/generic/tclNotify.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclNotify.c,v 1.24 2006/09/25 14:59:43 kennykb Exp $
+ * RCS: @(#) $Id: tclNotify.c,v 1.25 2006/09/25 15:02:54 dkf Exp $
*/
#include "tclInt.h"
@@ -523,23 +523,27 @@ Tcl_DeleteEvents(
ClientData clientData) /* The type-specific data. */
{
Tcl_Event *evPtr; /* Pointer to the event being examined */
- Tcl_Event *prevPtr; /* Pointer to evPtr's predecessor, or NULL
- * if evPtr designates the first event in the
- * queue for the thread */
+ Tcl_Event *prevPtr; /* Pointer to evPtr's predecessor, or NULL if
+ * evPtr designates the first event in the
+ * queue for the thread. */
Tcl_Event* hold;
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
Tcl_MutexLock(&(tsdPtr->queueMutex));
- /* Walk the queue of events for the thread, applying 'proc' to each */
+ /*
+ * Walk the queue of events for the thread, applying 'proc' to each to
+ * decide whether to eliminate the event.
+ */
prevPtr = NULL;
evPtr = tsdPtr->firstEventPtr;
while (evPtr != NULL) {
- if ((*proc) (evPtr, clientData) == 1) {
-
- /* This event should be deleted. Unlink it. */
+ if ((*proc)(evPtr, clientData) == 1) {
+ /*
+ * This event should be deleted. Unlink it.
+ */
if (prevPtr == NULL) {
tsdPtr->firstEventPtr = evPtr->nextPtr;
@@ -547,7 +551,9 @@ Tcl_DeleteEvents(
prevPtr->nextPtr = evPtr->nextPtr;
}
- /* Update 'last' and 'marker' events if either has been deleted. */
+ /*
+ * Update 'last' and 'marker' events if either has been deleted.
+ */
if (evPtr->nextPtr == NULL) {
tsdPtr->lastEventPtr = prevPtr;
@@ -556,19 +562,20 @@ Tcl_DeleteEvents(
tsdPtr->markerEventPtr = prevPtr;
}
- /* Delete the event data structure. */
+ /*
+ * Delete the event data structure.
+ */
hold = evPtr;
evPtr = evPtr->nextPtr;
ckfree((char *) hold);
-
} else {
-
- /* Event is to be retained. */
+ /*
+ * Event is to be retained.
+ */
prevPtr = evPtr;
evPtr = evPtr->nextPtr;
-
}
}
Tcl_MutexUnlock(&(tsdPtr->queueMutex));