From d747620257c261ba18470abdd248e48ec599d2be Mon Sep 17 00:00:00 2001 From: wb2osz Date: Sat, 20 Jun 2020 21:06:00 -0400 Subject: [PATCH] Add another search location for tocalls.txt. --- src/decode_aprs.c | 10 ++++++---- src/symbols.c | 10 +++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/decode_aprs.c b/src/decode_aprs.c index 4a63f28..c98e304 100644 --- a/src/decode_aprs.c +++ b/src/decode_aprs.c @@ -1967,6 +1967,7 @@ static void aprs_status_report (decode_aprs_t *A, char *info, int ilen) /* * Do we have format with 6 character Maidenhead locator? */ + else if (get_maidenhead (A, pm6->mhead6) == 6) { memset (A->g_maidenhead, 0, sizeof(A->g_maidenhead)); @@ -3788,11 +3789,12 @@ static struct tocalls_s { static int num_tocalls = 0; // Make sure the array is null terminated. -// If search order is changed, do the same in symbols.c +// If search order is changed, do the same in symbols.c for consistency. static const char *search_locations[] = { - (const char *) "tocalls.txt", - (const char *) "../data/tocalls.txt", + (const char *) "tocalls.txt", // CWD + (const char *) "data/tocalls.txt", // Windows with CMake + (const char *) "../data/tocalls.txt", // ? #ifndef __WIN32__ (const char *) "/usr/local/share/direwolf/tocalls.txt", (const char *) "/usr/share/direwolf/tocalls.txt", @@ -3804,7 +3806,7 @@ static const char *search_locations[] = { // path as well. (const char *) "/opt/local/share/direwolf/tocalls.txt", #endif - (const char *) NULL + (const char *) NULL // Important - Indicates end of list. }; static int tocall_cmp (const void *px, const void *py) diff --git a/src/symbols.c b/src/symbols.c index 448fbcc..dc76d4e 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -261,12 +261,12 @@ static const struct { // Make sure the array is null terminated. -// If search order is changed, do the same in decode_aprs.c +// If search order is changed, do the same in decode_aprs.c for consistency. static const char *search_locations[] = { - (const char *) "symbols-new.txt", - (const char *) "data/symbols-new.txt", - (const char *) "../data/symbols-new.txt", + (const char *) "symbols-new.txt", // CWD + (const char *) "data/symbols-new.txt", // Windows with Cmake + (const char *) "../data/symbols-new.txt", // ? #ifndef __WIN32__ (const char *) "/usr/local/share/direwolf/symbols-new.txt", (const char *) "/usr/share/direwolf/symbols-new.txt", @@ -278,7 +278,7 @@ static const char *search_locations[] = { // path as well. (const char *) "/opt/local/share/direwolf/symbols-new.txt", #endif - (const char *) NULL + (const char *) NULL // Important - Indicates end of list. };