From 51878ccaaf9cc69da8a8ed4d354e5eedf7625d78 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 1 Jul 2018 19:47:43 +0100 Subject: [PATCH] cave: use full path to database and relocate into games --- Applications/cave/advent.h | 2 ++ Applications/cave/database.c | 2 +- Applications/cave/fuzix-cave.pkg | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Applications/cave/advent.h b/Applications/cave/advent.h index 828786c4..c0cf7eac 100644 --- a/Applications/cave/advent.h +++ b/Applications/cave/advent.h @@ -15,6 +15,8 @@ #include #include +#define ADVDB_PATH "/usr/games/lib/advent.db" + #define NUL '\0' #define MAXDIM(a) (sizeof(a) / sizeof(a[0])) diff --git a/Applications/cave/database.c b/Applications/cave/database.c index e095830b..8b97b248 100644 --- a/Applications/cave/database.c +++ b/Applications/cave/database.c @@ -26,7 +26,7 @@ static void dbstring(uint16_t * off) void db_init(void) { - db_fd = open("advent.db", O_RDONLY); + db_fd = open(ADVDB_PATH, O_RDONLY); if (db_fd == -1) { perror("advent.db"); exit(1); diff --git a/Applications/cave/fuzix-cave.pkg b/Applications/cave/fuzix-cave.pkg index ee3dcd5a..a494138b 100644 --- a/Applications/cave/fuzix-cave.pkg +++ b/Applications/cave/fuzix-cave.pkg @@ -1,5 +1,5 @@ package adventure if-file advent -f 0755 /usr/bin/advent advent -f 0644 /usr/bin/advent.db advent.db +f 0755 /usr/games/advent advent +f 0644 /usr/games/advent.db advent.db -- 2.34.1