s/util/curses.

This commit is contained in:
Murilo Pereira 2011-05-08 20:38:36 -03:00
parent 4802244efa
commit 3d421f31d3
10 changed files with 13 additions and 11 deletions

View File

@ -10,7 +10,7 @@ LIB_OBJECTS = ${LIB_DIR}/common.o \
${LIB_DIR}/card.o \ ${LIB_DIR}/card.o \
${LIB_DIR}/stack.o \ ${LIB_DIR}/stack.o \
${LIB_DIR}/deck.o \ ${LIB_DIR}/deck.o \
${LIB_DIR}/util.o \ ${LIB_DIR}/curses.o \
${LIB_DIR}/cursor.o \ ${LIB_DIR}/cursor.o \
${LIB_DIR}/keyboard.o \ ${LIB_DIR}/keyboard.o \
${LIB_DIR}/display.o \ ${LIB_DIR}/display.o \
@ -23,7 +23,7 @@ TEST_OBJECTS = ${TEST_DIR}/frame_test.o \
${TEST_DIR}/card_test.o \ ${TEST_DIR}/card_test.o \
${TEST_DIR}/stack_test.o \ ${TEST_DIR}/stack_test.o \
${TEST_DIR}/deck_test.o \ ${TEST_DIR}/deck_test.o \
${TEST_DIR}/util_test.o \ ${TEST_DIR}/curses_test.o \
${TEST_DIR}/cursor_test.o \ ${TEST_DIR}/cursor_test.o \
${TEST_DIR}/keyboard_test.o \ ${TEST_DIR}/keyboard_test.o \
${TEST_DIR}/display_test.o \ ${TEST_DIR}/display_test.o \

View File

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <ncurses.h> #include <ncurses.h>
#include <locale.h> #include <locale.h>
#include "util.h" #include "curses.h"
void initialize_curses() { void initialize_curses() {
setlocale(LC_ALL, "en_US.utf-8"); /* supporting unicode characters */ setlocale(LC_ALL, "en_US.utf-8"); /* supporting unicode characters */

View File

@ -1,5 +1,5 @@
#ifndef UTIL_H #ifndef TTY_SOLITAIRE_CURSES_H
#define UTIL_H #define TTY_SOLITAIRE_CURSES_H
void initialize_curses(); void initialize_curses();
void end_curses(); void end_curses();

View File

@ -5,7 +5,7 @@
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
#include "display.h" #include "display.h"
#include "util.h" #include "curses.h"
#include "common.h" #include "common.h"
#include "game.h" #include "game.h"

View File

@ -2,6 +2,7 @@
#include "card.h" #include "card.h"
#include "game.h" #include "game.h"
#include "display.h" #include "display.h"
#include "curses.h"
#include "keyboard.h" #include "keyboard.h"
static bool cursor_on_stock(struct cursor *cursor) { static bool cursor_on_stock(struct cursor *cursor) {

View File

@ -5,6 +5,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include "stack.h" #include "stack.h"
#include "common.h"
void allocate_stack(struct stack **stack) { void allocate_stack(struct stack **stack) {
if (!(*stack = malloc(sizeof(**stack)))) { if (!(*stack = malloc(sizeof(**stack)))) {

View File

@ -1,6 +1,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <ncurses.h> #include <ncurses.h>
#include "util.h" #include "curses.h"
#include "game.h" #include "game.h"
#include "keyboard.h" #include "keyboard.h"

View File

@ -1,7 +1,7 @@
#include <assert.h> #include <assert.h>
#include <stdbool.h> #include <stdbool.h>
#include "../lib/util.h" #include "../lib/curses.h"
void test_util() { void test_curses() {
assert(true); assert(true);
} }

View File

@ -13,7 +13,7 @@ int main(int argc, const char *argv[]) {
test_game(); test_game();
test_keyboard(); test_keyboard();
test_stack(); test_stack();
test_util(); test_curses();
test_test_helper(); test_test_helper();
return(0); return(0);

View File

@ -9,7 +9,7 @@ void test_frame();
void test_game(); void test_game();
void test_keyboard(); void test_keyboard();
void test_stack(); void test_stack();
void test_util(); void test_curses();
void test_test_helper(); void test_test_helper();
#endif #endif