[Tux4kids-commits] r1697 - tuxmath/trunk/src
David Bruce
dbruce-guest at alioth.debian.org
Sun Dec 27 13:50:43 UTC 2009
Author: dbruce-guest
Date: 2009-12-27 13:50:43 +0000 (Sun, 27 Dec 2009)
New Revision: 1697
Modified:
tuxmath/trunk/src/menu.c
tuxmath/trunk/src/network.c
tuxmath/trunk/src/network.h
tuxmath/trunk/src/server.c
tuxmath/trunk/src/server.h
Log:
Fixed conditional compilation for HAVE_LIBSDL_NET
Modified: tuxmath/trunk/src/menu.c
===================================================================
--- tuxmath/trunk/src/menu.c 2009-12-27 04:43:58 UTC (rev 1696)
+++ tuxmath/trunk/src/menu.c 2009-12-27 13:50:43 UTC (rev 1697)
@@ -948,6 +948,7 @@
/* Go up one entry, if present: */
case SDLK_UP:
+ case SDLK_k: // get them ready for vi/vim ;)
{
if (Opts_GetGlobalOpt(MENU_SOUND))
playsound(SND_TOCK);
@@ -964,6 +965,7 @@
}
case SDLK_DOWN:
+ case SDLK_j:
{
if (Opts_GetGlobalOpt(MENU_SOUND))
playsound(SND_TOCK);
Modified: tuxmath/trunk/src/network.c
===================================================================
--- tuxmath/trunk/src/network.c 2009-12-27 04:43:58 UTC (rev 1696)
+++ tuxmath/trunk/src/network.c 2009-12-27 13:50:43 UTC (rev 1697)
@@ -1,7 +1,8 @@
/*
* C Implementation: network.c
*
-* Description: Contains all the network realted functions , for LAN-based play in Tux,of Math Command.
+* Description: Contains all the network-related functions for
+* LAN-based play in "Tux, of Math Command".
*
*
* Author: Akash Gangil, David Bruce, and the TuxMath team, (C) 2009
@@ -10,6 +11,9 @@
* Copyright: See COPYING file that comes with this distribution. (Briefly, GNU GPL).
*/
+/* Must have this first for the #ifdef HAVE_LIBSDL_NET to work */
+#include "globals.h"
+
#ifdef HAVE_LIBSDL_NET
#include <stdio.h>
@@ -19,7 +23,6 @@
#include <unistd.h>
#include <fcntl.h>
-#include "globals.h"
#include "mathcards.h"
#include "transtruct.h"
#include "network.h"
Modified: tuxmath/trunk/src/network.h
===================================================================
--- tuxmath/trunk/src/network.h 2009-12-27 04:43:58 UTC (rev 1696)
+++ tuxmath/trunk/src/network.h 2009-12-27 13:50:43 UTC (rev 1697)
@@ -16,6 +16,8 @@
#ifndef NETWORK_H
#define NETWORK_H
+#include "config.h"
+
#ifdef HAVE_LIBSDL_NET
#include "transtruct.h"
Modified: tuxmath/trunk/src/server.c
===================================================================
--- tuxmath/trunk/src/server.c 2009-12-27 04:43:58 UTC (rev 1696)
+++ tuxmath/trunk/src/server.c 2009-12-27 13:50:43 UTC (rev 1697)
@@ -17,9 +17,11 @@
* the tutorial code is still present here - David Bruce
*/
+/* This must come before #ifdef HAVE_LIBSDL_NET to get "config.h" */
+#include "globals.h"
+
#ifdef HAVE_LIBSDL_NET
-#include "globals.h"
#include "server.h"
#include "transtruct.h"
#include "mathcards.h"
@@ -206,7 +208,7 @@
local_argv[i] = argv[i];
}
- if(pthread_create(&server_thread, NULL, run_server_local_args, NULL))
+ f(pthread_create(&server_thread, NULL, run_server_local_args, NULL))
{
printf("Error creating thread\n");
return -1;
Modified: tuxmath/trunk/src/server.h
===================================================================
--- tuxmath/trunk/src/server.h 2009-12-27 04:43:58 UTC (rev 1696)
+++ tuxmath/trunk/src/server.h 2009-12-27 13:50:43 UTC (rev 1697)
@@ -8,9 +8,11 @@
*/
-#ifndef SERVER_H
-#define SERVER_H == 1)
+#ifndef TM_SERVER_H
+#define TM_SERVER_H
+#include "config.h"
+
#ifdef HAVE_LIBSDL_NET
#include "SDL_net.h"
More information about the Tux4kids-commits
mailing list