diff --git a/Makefile b/Makefile index 29423f9..0e08f96 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ LIB_OBJECTS = ${LIB_DIR}/common.o \ ${LIB_DIR}/card.o \ ${LIB_DIR}/stack.o \ ${LIB_DIR}/deck.o \ - ${LIB_DIR}/util.o \ + ${LIB_DIR}/curses.o \ ${LIB_DIR}/cursor.o \ ${LIB_DIR}/keyboard.o \ ${LIB_DIR}/display.o \ @@ -23,7 +23,7 @@ TEST_OBJECTS = ${TEST_DIR}/frame_test.o \ ${TEST_DIR}/card_test.o \ ${TEST_DIR}/stack_test.o \ ${TEST_DIR}/deck_test.o \ - ${TEST_DIR}/util_test.o \ + ${TEST_DIR}/curses_test.o \ ${TEST_DIR}/cursor_test.o \ ${TEST_DIR}/keyboard_test.o \ ${TEST_DIR}/display_test.o \ diff --git a/lib/util.c b/lib/curses.c similarity index 98% rename from lib/util.c rename to lib/curses.c index 9b6522d..2edceea 100644 --- a/lib/util.c +++ b/lib/curses.c @@ -1,7 +1,7 @@ #include #include #include -#include "util.h" +#include "curses.h" void initialize_curses() { setlocale(LC_ALL, "en_US.utf-8"); /* supporting unicode characters */ diff --git a/lib/util.h b/lib/curses.h similarity index 54% rename from lib/util.h rename to lib/curses.h index e02c4fc..1d35c18 100644 --- a/lib/util.h +++ b/lib/curses.h @@ -1,5 +1,5 @@ -#ifndef UTIL_H -#define UTIL_H +#ifndef TTY_SOLITAIRE_CURSES_H +#define TTY_SOLITAIRE_CURSES_H void initialize_curses(); void end_curses(); diff --git a/lib/game.c b/lib/game.c index 5349259..427e253 100644 --- a/lib/game.c +++ b/lib/game.c @@ -5,7 +5,7 @@ #include #include #include "display.h" -#include "util.h" +#include "curses.h" #include "common.h" #include "game.h" diff --git a/lib/keyboard.c b/lib/keyboard.c index d96f786..382e909 100644 --- a/lib/keyboard.c +++ b/lib/keyboard.c @@ -2,6 +2,7 @@ #include "card.h" #include "game.h" #include "display.h" +#include "curses.h" #include "keyboard.h" static bool cursor_on_stock(struct cursor *cursor) { diff --git a/lib/stack.c b/lib/stack.c index 74b6aac..8bcacc9 100644 --- a/lib/stack.c +++ b/lib/stack.c @@ -5,6 +5,7 @@ #include #include #include "stack.h" +#include "common.h" void allocate_stack(struct stack **stack) { if (!(*stack = malloc(sizeof(**stack)))) { diff --git a/lib/ttysolitaire.c b/lib/ttysolitaire.c index 0e9c265..bd7da5c 100644 --- a/lib/ttysolitaire.c +++ b/lib/ttysolitaire.c @@ -1,6 +1,6 @@ #include #include -#include "util.h" +#include "curses.h" #include "game.h" #include "keyboard.h" diff --git a/test/util_test.c b/test/curses_test.c similarity index 55% rename from test/util_test.c rename to test/curses_test.c index bc57dfc..599da5a 100644 --- a/test/util_test.c +++ b/test/curses_test.c @@ -1,7 +1,7 @@ #include #include -#include "../lib/util.h" +#include "../lib/curses.h" -void test_util() { +void test_curses() { assert(true); } diff --git a/test/ttysolitaire_test.c b/test/ttysolitaire_test.c index d262920..5ad018d 100644 --- a/test/ttysolitaire_test.c +++ b/test/ttysolitaire_test.c @@ -13,7 +13,7 @@ int main(int argc, const char *argv[]) { test_game(); test_keyboard(); test_stack(); - test_util(); + test_curses(); test_test_helper(); return(0); diff --git a/test/ttysolitaire_test.h b/test/ttysolitaire_test.h index 66e0cdb..67fce1b 100644 --- a/test/ttysolitaire_test.h +++ b/test/ttysolitaire_test.h @@ -9,7 +9,7 @@ void test_frame(); void test_game(); void test_keyboard(); void test_stack(); -void test_util(); +void test_curses(); void test_test_helper(); #endif