summaryrefslogtreecommitdiffstats
path: root/unix/tclSelectNotfy.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2021-03-21 13:07:15 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2021-03-21 13:07:15 (GMT)
commitc49b98fa6b7afdb6f63c4abca16d73c56990b715 (patch)
tree9574b65541cfeafbb15d115348443777af5de242 /unix/tclSelectNotfy.c
parent4e90ccc6db032c546939cdcdfa33fcecd7122dce (diff)
downloadtcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.zip
tcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.tar.gz
tcl-c49b98fa6b7afdb6f63c4abca16d73c56990b715.tar.bz2
Start of doing a clean up of the notifier code.
This originated as trying to stop macOS builds from doing silly warnings during a static build, but I noticed that there were common patterns that belong in generic code instead of being repeated in each of the platform-specific pieces.
Diffstat (limited to 'unix/tclSelectNotfy.c')
-rw-r--r--unix/tclSelectNotfy.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index 1d16114..e40997f 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -216,8 +216,8 @@ extern "C" {
typedef struct {
void *hwnd; /* Messaging window. */
unsigned int *message; /* Message payload. */
- size_t wParam; /* Event-specific "word" parameter. */
- size_t lParam; /* Event-specific "long" parameter. */
+ size_t wParam; /* Event-specific "word" parameter. */
+ size_t lParam; /* Event-specific "long" parameter. */
int time; /* Event timestamp. */
int x; /* Event location (where meaningful). */
int y;
@@ -244,8 +244,8 @@ extern void __stdcall CloseHandle(void *);
extern void *__stdcall CreateEventW(void *, unsigned char, unsigned char,
void *);
extern void *__stdcall CreateWindowExW(void *, const void *, const void *,
- unsigned int, int, int, int, int, void *, void *, void *,
- void *);
+ unsigned int, int, int, int, int, void *, void *,
+ void *, void *);
extern unsigned int __stdcall DefWindowProcW(void *, int, void *, void *);
extern unsigned char __stdcall DestroyWindow(void *);
extern int __stdcall DispatchMessageW(const MSG *);
@@ -504,7 +504,7 @@ Tcl_CreateFileHandler(
FD_CLR(fd, &tsdPtr->checkMasks.exception);
}
if (tsdPtr->numFdBits <= fd) {
- tsdPtr->numFdBits = fd+1;
+ tsdPtr->numFdBits = fd + 1;
}
}
}
@@ -573,11 +573,11 @@ Tcl_DeleteFileHandler(
if (fd+1 == tsdPtr->numFdBits) {
int numFdBits = 0;
- for (i = fd-1; i >= 0; i--) {
+ for (i = fd - 1; i >= 0; i--) {
if (FD_ISSET(i, &tsdPtr->checkMasks.readable)
|| FD_ISSET(i, &tsdPtr->checkMasks.writable)
|| FD_ISSET(i, &tsdPtr->checkMasks.exception)) {
- numFdBits = i+1;
+ numFdBits = i + 1;
break;
}
}
@@ -1113,6 +1113,8 @@ NotifierThreadProc(
#endif /* TCL_THREADS */
#endif /* (!NOTIFIER_EPOLL && !NOTIFIER_KQUEUE) || !TCL_THREADS */
+#else
+TCL_MAC_EMPTY_FILE(unix_tclSelectNotfy_c)
#endif /* !HAVE_COREFOUNDATION */
/*