]> git.pond.sub.org Git - empserver/blobdiff - src/client/play.c
Update known contributors comments
[empserver] / src / client / play.c
index 072c5e754377db6eef920b20621b9ceed9889bbb..11ea847e9fe6626bff9bcaa85575200179dcd3a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
  *  ---
  *
  *  play.c: Playing the game
- * 
+ *
  *  Known contributors to this file:
  *     Markus Armbruster, 2007
- *     Ron Koenderink, 2007
+ *     Ron Koenderink, 2007-2009
  */
 
 #include <config.h>
@@ -104,7 +104,7 @@ sigaction(int signal, struct sigaction *action, struct sigaction *oaction)
 {
     assert(!oaction);
     assert(action);
-    
+
     if (signal == SIGPIPE)
        assert(action->sa_handler == SIG_IGN);
     else {
@@ -158,11 +158,11 @@ stdin_read_thread(LPVOID lpParam)
  * Initialize and start the stdin reading thread for WIN32
  */
 static void
-sysdep_stdin_init()
+sysdep_stdin_init(void)
 {
-    bounce_empty = CreateEvent(NULL, FALSE, TRUE, "bounce_empty");
-    bounce_full = CreateEvent(NULL, TRUE, FALSE, "bounce_full");
-    ctrl_c_event = CreateEvent(NULL, FALSE, FALSE, "Ctrl_C");
+    bounce_empty = CreateEvent(NULL, FALSE, TRUE, NULL);
+    bounce_full = CreateEvent(NULL, TRUE, FALSE, NULL);
+    ctrl_c_event = CreateEvent(NULL, FALSE, FALSE, NULL);
     CreateThread(NULL, 0, stdin_read_thread, NULL, 0, NULL);
 }
 
@@ -218,7 +218,7 @@ w32_select(int nfds, fd_set *rdfd, fd_set *wrfd, fd_set *errfd, struct timeval*
        return -1;
     }
     WSACloseEvent(handles[num_handles - 1]);
-    
+
     if (num_handles == 3 && result == WAIT_OBJECT_0) {
        errno = EINTR;
        return -1;
@@ -283,6 +283,7 @@ w32_ring_from_file_or_bounce_buf(struct ring *r, int fd)
        w32_recv((sock), (buffer), (buf_size), 0)
 #define select(nfds, rd, wr, error, time) \
        w32_select((nfds), (rd), (wr), (error), (time))
+#define sigemptyset(mask) ((void)0)
 #else
 #define sysdep_stdin_init() ((void)0)
 #endif
@@ -455,6 +456,7 @@ play(int sock)
     int n;
 
     sa.sa_flags = 0;
+    sigemptyset(&sa.sa_mask);
     sa.sa_handler = intr;
     sigaction(SIGINT, &sa, NULL);
     sa.sa_handler = SIG_IGN;