move test_output to game_private
This commit is contained in:
1 parent
b514e98e70
commit
45b528c6a6
4 files changed
+16
-8
No files matched your search
@@ -12,4 +12,11 @@ void checkPointer(void* p, char* errMessage) {
|
||||
fprintf(stderr, "%s", errMessage);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void test_output(int i, int excepted, char* message) {
|
||||
if (i != excepted) {
|
||||
fprintf(stderr, message);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
@@ -28,4 +28,13 @@ int max(int a, int b);
|
||||
*/
|
||||
void checkPointer(void* p, char* errMessage);
|
||||
|
||||
/**
|
||||
* @brief test if i and excepted are the same else exit the prog with the message
|
||||
*
|
||||
* @param i
|
||||
* @param excepted
|
||||
* @param message to print in stderr
|
||||
*/
|
||||
void test_output(int i, int excepted, char* message);
|
||||
|
||||
#endif
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "game.h"
|
||||
#include "game_ext.h"
|
||||
#include "game_private.h"
|
||||
#include "game_tools.c"
|
||||
#include "game_tools.h"
|
||||
|
||||
void usage() {
|
||||
|
||||
@@ -6,13 +6,6 @@
|
||||
|
||||
#define NB_CHAR_HEADER_WITHTOUT_DIMENSIONS 4
|
||||
|
||||
void test_output(int i, int excepted, char* message) {
|
||||
if (i != excepted) {
|
||||
fprintf(stderr, message);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
game game_load(char* filename) {
|
||||
checkPointer((void*)filename, "NULL pointer filename on game_load\n");
|
||||
// ouvrons le fichier
|
||||
|
||||
Reference in new issue
Block a user