aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ct1986.c8
-rw-r--r--src/ctaklm.c10
2 files changed, 7 insertions, 11 deletions
diff --git a/src/ct1986.c b/src/ct1986.c
index 91d70b0..b265b57 100644
--- a/src/ct1986.c
+++ b/src/ct1986.c
@@ -95,8 +95,9 @@ new_game(uint8_t size) {
gamelog[0] = 0;
}
-static void
-dot(const uint8_t depth) {
+// Set up output function for ct1986
+inline void
+ct1986_display_progress(const uint8_t depth) {
if (depth == 0) {
fputc('#', lcd);
}
@@ -165,9 +166,6 @@ main(int argc, char **argv) {
lcd = fopen("/dev/lcd","w");
if (lcd == NULL) return EXIT_FAILURE;
- // Set up output function for ct1986
- ct1986_display_progress = ˙
-
human = 0;
search_depth = 3;
new_game(5);
diff --git a/src/ctaklm.c b/src/ctaklm.c
index a198d2c..eb2a788 100644
--- a/src/ctaklm.c
+++ b/src/ctaklm.c
@@ -296,8 +296,9 @@ load_ptn(const char* fn) {
static float sum_depth, num_check;
-static void
-dot(const uint8_t depth) {
+// Set up output function for ct1986
+inline void
+ct1986_display_progress(const uint8_t depth) {
sum_depth += depth;
num_check += 1;
if (depth == 0) {
@@ -413,15 +414,12 @@ main(int argc, char **argv) {
(void)(argc);
(void)(argv);
- // Set up output function for ct1986
- ct1986_display_progress = ˙
-
human = 0;
search_depth = 3;
new_game(5);
char *line = NULL;
- ssize_t read;
+ ssize_t read = -1;
size_t alloc_size;
for (int playing = 1; playing;) {