void util_meminfo() {
struct memblock_t *info;
- if (!opts_memchk)
+ if (!opts.memchk)
return;
for (info = mem_start; info; info = info->next) {
void util_debug(const char *area, const char *ms, ...) {
va_list va;
- if (!opts_debug)
+ if (!opts.debug)
return;
- if (!strcmp(area, "MEM") && !opts_memchk)
+ if (!strcmp(area, "MEM") && !opts.memchk)
return;
va_start(va, ms);
FILE *util_fopen(const char *filename, const char *mode)
{
-#ifdef WIN32
+#ifdef _MSC_VER
FILE *out;
if (fopen_s(&out, filename, mode) != 0)
return NULL;
* below. These should be autovectorized by gcc.
*/
#ifdef __x86_64__
-GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
+GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
const uint64_t mix = 0xC6A4A7935BD1E995;
const int rot = 47;
size_t size = strlen(key);
}
#else
-GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, register size_t seed) {
+GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
const uint32_t mix = 0x5BD1E995;
const uint32_t rot = 24;
size_t size = strlen(key);
uint32_t hash = seed ^ size;
uint32_t alias = 0;
- const unsigned char *data = (const unsigned char*)ket;
+ const unsigned char *data = (const unsigned char*)key;
while (size >= 4) {
alias = *(uint32_t*)data;