summaryrefslogtreecommitdiff
path: root/lib/wsprcode/nhash.c
blob: a10f45fbeccc93238d371f8def1d94907345fc93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stddef.h>
#include <stdint.h>

#include "../lookup3.h"

/* Legacy WSPR expects compiler-specific Fortran names and the raw hash. */
#ifdef STDCALL
uint32_t __stdcall NHASH(const void *key, size_t *length, uint32_t *initval)
{
  return wsjt_hashlittle(key, *length, *initval);
}
#else
uint32_t nhash_(const void *key, int *length, uint32_t *initval)
{
  return wsjt_hashlittle(key, (size_t)*length, *initval);
}
#endif