summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2010-11-21 22:23:20 +0000
committerLudovic Pouzenc <ludovic@pouzenc.fr>2010-11-21 22:23:20 +0000
commit99cfc03f7fd762b5c7be8548778bdbb37ca2711a (patch)
tree7bdd6d21934e2242609ad6b69322f4f9d685065d /src
parent0ee8598e757d1bfc41bc537c5ea24a59967fb207 (diff)
download2010-netlemmings-99cfc03f7fd762b5c7be8548778bdbb37ca2711a.tar.gz
2010-netlemmings-99cfc03f7fd762b5c7be8548778bdbb37ca2711a.tar.bz2
2010-netlemmings-99cfc03f7fd762b5c7be8548778bdbb37ca2711a.zip
Les tests ne compilent pas tout à fait, mais ça attendra demain
git-svn-id: file:///var/svn/2010-netlemmings/trunk@166 077b3477-7977-48bd-8428-443f22f7bfda
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/test/testfunc_001_lex.c1
-rw-r--r--src/test/testfunc_002_parse.c8
-rw-r--r--src/test/testfunc_003_loadress.c3
4 files changed, 5 insertions, 15 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5547dbf..23ea549 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,14 +1,6 @@
set(SRC_COMMON events.c netgame.c timing.c utils.c)
-# Include the directory itself as a path to include directories
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#set(INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include")
-set(INCLUDE_DIRECTORIES include)
-# add the binary tree to the search path for include files
-# so that we will find netlem.h and netlem_ds.h
-include_directories("${INCLUDE_DIRECTORIES}" "${PROJECT_BINARY_DIR}")
-
# configure a header file to pass some of the CMake settings
# to the source code
configure_file (
diff --git a/src/test/testfunc_001_lex.c b/src/test/testfunc_001_lex.c
index d936e7b..8c9d870 100644
--- a/src/test/testfunc_001_lex.c
+++ b/src/test/testfunc_001_lex.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "SDL/SDL.h"
-#include "../parser/ginit.h"
extern FILE *yyin;
extern int yylex();
diff --git a/src/test/testfunc_002_parse.c b/src/test/testfunc_002_parse.c
index 62c71bd..b09df2e 100644
--- a/src/test/testfunc_002_parse.c
+++ b/src/test/testfunc_002_parse.c
@@ -2,13 +2,13 @@
#include <string.h>
#include "SDL/SDL.h"
#include "../parser/y.tab.h"
-#include "../parser/ginit.h"
+#include "data_ini.h"
extern FILE *yyin;
int main(int argc, char **argv) {
char *filepath=NULL;
- struct gameInit gInit;
+ gameIni_t gIni;
if (argc<2) {
fprintf(stderr, "Usage %s <ini_file>\n", argv[0]);
@@ -25,9 +25,9 @@ int main(int argc, char **argv) {
return 2;
}
}
- memset(&gInit,0,sizeof(gInit));
+ memset(&gIni,0,sizeof(gameIni_t));
printf("Parsing '%s'\n", filepath);
- parse(&gInit);
+ parse(&gIni);
// printf("End of parse ('%s')\n", filepath);
fclose(yyin);
diff --git a/src/test/testfunc_003_loadress.c b/src/test/testfunc_003_loadress.c
index 5edaedc..f8c9b65 100644
--- a/src/test/testfunc_003_loadress.c
+++ b/src/test/testfunc_003_loadress.c
@@ -10,11 +10,10 @@
#define MAX_PATH_LEN 255
extern FILE *yyin;
-void load_ini(gamaeIni_t *gIni, char filepath) {
+void load_ini(gameIni_t *gIni, char *filepath) {
yyin=fopen(filepath, "r");
if (yyin == NULL ) {
fprintf(stderr, "main(), Could not open '%s'\n", filepath);
- return 2;
}
printf("Parsing '%s'\n", filepath);
parse(&gIni);