summaryrefslogtreecommitdiff
path: root/lib/wsprd/wsprd_utils.c
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:18:20 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:18:20 +0200
commita8edac06b534058e52126c4d55e23b217df2df91 (patch)
treef2c3567fae58aad676d544ee8f07ac78dd2eb1ec /lib/wsprd/wsprd_utils.c
parent4f6c0156a70e8f2ff70fe5a1a39f5e9b22ffd026 (diff)
parent32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (diff)
Update upstream source from tag 'upstream/2.2.0_rc1+repack'
Update to upstream version '2.2.0~rc1+repack' with Debian dir fe177bc6cd2d4c1256a3775504f6010be54e7463
Diffstat (limited to 'lib/wsprd/wsprd_utils.c')
-rw-r--r--lib/wsprd/wsprd_utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/wsprd/wsprd_utils.c b/lib/wsprd/wsprd_utils.c
index 65485d4b..5a1d4974 100644
--- a/lib/wsprd/wsprd_utils.c
+++ b/lib/wsprd/wsprd_utils.c
@@ -240,7 +240,7 @@ int floatcomp(const void* elem1, const void* elem2)
return *(const float*)elem1 > *(const float*)elem2;
}
-int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsign)
+int unpk_(signed char *message, char *hashtab, char *loctab, char *call_loc_pow, char *callsign)
{
int n1,n2,n3,ndbm,ihash,nadd,noprint=0;
char grid[5],grid6[7],cdbm[3];
@@ -279,6 +279,7 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig
strncat(call_loc_pow,"\0",1);
ihash=nhash(callsign,strlen(callsign),(uint32_t)146);
strcpy(hashtab+ihash*13,callsign);
+ strcpy(loctab+ihash*5,grid);
} else {
nadd=nu;
if( nu > 3 ) nadd=nu-3;
@@ -312,8 +313,8 @@ int unpk_(signed char *message, char *hashtab, char *call_loc_pow, char *callsig
// not testing 4'th and 5'th chars because of this case: <PA0SKT/2> JO33 40
// grid is only 4 chars even though this is a hashed callsign...
// isalpha(grid6[4]) && isalpha(grid6[5]) ) ) {
- noprint=1;
- }
+ noprint=1;
+ }
ihash=(n2-ntype-64)/128;
if( strncmp(hashtab+ihash*13,"\0",1) != 0 ) {