From 5b1fabc1f5044a1430b6e33a183dc99656033634 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Thu, 20 Aug 2020 18:00:20 +0000 Subject: [PATCH] got rid of another init git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@292 4df02467-bbd4-4a76-a152-e7ce94205b78 --- src/input.c | 14 +------------- src/version.h | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/input.c b/src/input.c index cb34e5e..d1dd57a 100644 --- a/src/input.c +++ b/src/input.c @@ -686,25 +686,14 @@ struct ipi { *prev; const char *path; }; -// TODO - just use &ipi_head as init values! -static struct ipi ipi_head = {NULL, NULL, NULL}; // head element +static struct ipi ipi_head = {&ipi_head, &ipi_head, NULL}; // head element static STRUCT_DYNABUF_REF(pathbuf, 256); // to combine search path and file spec -// make sure list is ready -static void check_includepaths_list(void) -{ - if (ipi_head.next == NULL) { - // init ring list - ipi_head.next = &ipi_head; - ipi_head.prev = &ipi_head; - } -} // add entry void includepaths_add(const char *path) { struct ipi *ipi; - check_includepaths_list(); ipi = safe_malloc(sizeof(*ipi)); ipi->path = path; ipi->next = &ipi_head; @@ -720,7 +709,6 @@ FILE *includepaths_open_ro(boolean uses_lib) FILE *stream; struct ipi *ipi; - check_includepaths_list(); // first try directly, regardless of whether lib or not: stream = fopen(GLOBALDYNABUF_CURRENT, FILE_READBINARY); // if failed and not lib, try include paths: diff --git a/src/version.h b/src/version.h index d49f308..e68bece 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ #define RELEASE "0.97" // update before release FIXME #define CODENAME "Zem" // update before release -#define CHANGE_DATE "16 Aug" // update before release FIXME +#define CHANGE_DATE "20 Aug" // update before release FIXME #define CHANGE_YEAR "2020" // update before release //#define HOME_PAGE "http://home.pages.de/~mac_bacon/smorbrod/acme/" #define HOME_PAGE "http://sourceforge.net/p/acme-crossass/" // FIXME