diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-05-14 19:27:16 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2011-05-14 19:27:16 +0000 |
commit | 322be6f81b59a499b41edb94baa9da6e03ec4f79 (patch) | |
tree | f1665dfb18d5230db29e394f7fdffc6a08180fae | |
parent | 51942759f9f27a0ff5eaf6e242ccca13c83d841c (diff) | |
download | 2010-netlemmings-322be6f81b59a499b41edb94baa9da6e03ec4f79.tar.gz 2010-netlemmings-322be6f81b59a499b41edb94baa9da6e03ec4f79.tar.bz2 2010-netlemmings-322be6f81b59a499b41edb94baa9da6e03ec4f79.zip |
Ajout de commentaire et check d'un FIXME sur les typedef et boucle de références
git-svn-id: file:///var/svn/2010-netlemmings/trunk@217 077b3477-7977-48bd-8428-443f22f7bfda
-rw-r--r-- | src/include/data_network.h | 4 | ||||
-rw-r--r-- | src/include/utils.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/include/data_network.h b/src/include/data_network.h index 9725cd5..5dc10fe 100644 --- a/src/include/data_network.h +++ b/src/include/data_network.h @@ -7,7 +7,7 @@ #include "data_lemming.h" #include "events.h" -// All necessary stuff to ensure that client node on the network can synchronize each other +// All necessary stuff to ensure that clients nodes on the network can synchronize each other #define DEFAULT_LISTEN_PORT 9999 @@ -18,7 +18,7 @@ typedef struct { enum gameState state; int startTime_ms; int clientCount; - struct _client_t **clients; // FIXME: il y a toujours la boucle ? + struct _client_t **clients; // typedef client_t defined below (ref loop) } game_t; enum clientState { clientNew, clientReady }; diff --git a/src/include/utils.h b/src/include/utils.h index 085884d..856a56e 100644 --- a/src/include/utils.h +++ b/src/include/utils.h @@ -6,12 +6,17 @@ #define LOG_WARN 2 #define LOG_ERROR 3 +// open a log file. If path==NULL, then use stderr void openLog(char path[]); void closeLog(); +// Log a string void logs(int level, char msg[]); +// Log 2 strings void logs2(int level, char context[], char msg[]); +// Log a system call failure (after msg, perror the last ERRNO error) void logp(int level, char msg[]); +// Math small stuff int min(int a, int b); int max(int a, int b); |