aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile18
-rw-r--r--src/ctlm.c (renamed from src/ctaklm.c)6
-rw-r--r--src/cttei.c (renamed from src/tei.c)8
4 files changed, 18 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index e76b6db..c8a996d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,7 @@
*.o
data/
ct1986
-ctaklm
+ctlm
pptdb
-tei
+cttei
buildroot*
diff --git a/Makefile b/Makefile
index 89c22fa..8b4ab58 100644
--- a/Makefile
+++ b/Makefile
@@ -16,20 +16,20 @@ CROSS_STRIP=$(BUILDROOT_DIR)/output/host/bin/arm-linux-strip
%.o: %.c
$(CC) -c $< -o $@ $(CFLAGS)
-ctaklm: src/ctaklm.o $(OBJS)
- $(CC) $(CFLAGS) src/ctaklm.o $(OBJS) -o ctaklm
+ctlm: src/ctlm.o $(OBJS)
+ $(CC) $(CFLAGS) src/ctlm.o $(OBJS) -o ctlm
+
+cttei: src/cttei.o $(OBJS)
+ $(CC) $(CFLAGS) src/cttei.o $(OBJS) -o cttei
pptdb: src/pptdb.o $(CTAK_OBJS)
$(CC) $(CFLAGS) src/pptdb.o $(CTAK_OBJS) -o pptdb
-tei: src/tei.o $(OBJS)
- $(CC) $(CFLAGS) src/tei.o $(OBJS) -o tei
-
clean:
- rm -f ctaklm ct1986 pptdb tei
+ rm -f ctlm ct1986 cttei pptdb
rm -f src/*.o include/*.o
-native: clean ctaklm pptdb tei
+native: clean ctlm cttei
$(CROSS_CC):
./resources/do_buildroot.sh $(BUILDROOT_DIR)
@@ -42,9 +42,9 @@ ct1986: $(CROSS_CC) clean src/ct1986.o include/lcdlib.o $(OBJS)
pi: CC=$(CROSS_CC)
pi: STRIP=$(CROSS_STRIP)
-pi: $(CROSS_CC) ct1986 ctaklm
+pi: $(CROSS_CC) ct1986 ctlm
mkdir -p $(BUILDROOT_DIR)/board/raspberrypi0/rootfs_overlay/usr/bin/
- cp ct1986 ctaklm $(BUILDROOT_DIR)/board/raspberrypi0/rootfs_overlay/usr/bin/
+ cp ct1986 ctlm $(BUILDROOT_DIR)/board/raspberrypi0/rootfs_overlay/usr/bin/
cp resources/ash-profile $(BUILDROOT_DIR)/board/raspberrypi0/rootfs_overlay/.profile
make -C $(BUILDROOT_DIR)
$(info Image ready in $(BUILDROOT_DIR)/output/images/sdcard.img)
diff --git a/src/ctaklm.c b/src/ctlm.c
index 0948fa7..09900e3 100644
--- a/src/ctaklm.c
+++ b/src/ctlm.c
@@ -1,5 +1,5 @@
/*
- ctaklm, a line mode interface to the ctak library
+ ctlm, a line mode interface to the ctak library
Copyright (C) 2021, tslil clingman
@@ -439,7 +439,7 @@ input_is_not_turn(const char *line) {
return EXIT_SUCCESS;
}
-const char* license = "ctaklm, a line mode interface to the ctak library\n\
+const char* license = "ctlm, a line mode interface to the ctak library\n\
\n\
Copyright (C) 2021, tslil clingman\n\
\n\
@@ -470,7 +470,7 @@ int main(int argc, char **argv) {
human = 0;
for (int playing = 1; playing;) {
while (human == 0) {
- fputs("ctaklm> ", stdout);
+ fputs("ctlm> ", stdout);
fflush(stdout);
read = getline(&line, &alloc_size, stdin);
if (read > 0) {
diff --git a/src/tei.c b/src/cttei.c
index 93c67ce..6321700 100644
--- a/src/tei.c
+++ b/src/cttei.c
@@ -1,5 +1,5 @@
/*
- ctaktei, a TEI interface to the ctak library & its computer opponent
+ cttei, a TEI interface to the ctak library & its computer opponent
Copyright (C) 2021, tslil clingman
@@ -86,7 +86,7 @@ handle_tei(char *line) {
return parse_position_string(line + 9);
} else if (!strncmp(line, "teinewgame", 10)) {
if (line[11] != '5') return TEI_FAILURE;
- const uint8_t size = line[11] - '0';
+ const uint8_t size = atoi(line + 11);
if (size != board_size) {
negamax_free();
reset_state(size);
@@ -99,7 +99,7 @@ handle_tei(char *line) {
return TEI_OK;
}
-const char* license = "ctaktei, a TEI interface to the ctak library & its computer opponent\n\
+const char* license = "cttei, a TEI interface to the ctak library & its computer opponent\n\
\n\
Copyright (C) 2021, tslil clingman\n\
\n\
@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
line = NULL;
// Identify ourselves, and send the options
- puts("id name ct1986");
+ puts("id name cttei");
puts("id author tslil clingman");
puts("option name Depth type spin default 4 min 2 max 6");
puts("teiok");