diff options
Diffstat (limited to 'src/common/utils.h')
-rw-r--r-- | src/common/utils.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/common/utils.h b/src/common/utils.h index 8e39f2655..d245f94e2 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -1,11 +1,13 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules Dev Team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena Dev Teams #ifndef _UTILS_H_ #define _UTILS_H_ #include "../common/cbasetypes.h" #include <stdio.h> // FILE* +#include <time.h> // generate a hex dump of the first 'length' bytes of 'buffer' void WriteDump(FILE* fp, const void* buffer, size_t length); @@ -29,4 +31,19 @@ extern uint16 GetWord(uint32 val, int idx); extern uint16 MakeWord(uint8 byte0, uint8 byte1); extern uint32 MakeDWord(uint16 word0, uint16 word1); +/* [Ind/Hercules] Caching */ +struct HCache_interface { + void (*init) (void); + /* */ + bool (*check) (const char *file); + FILE *(*open) (const char *file, const char *opt); + /* */ + time_t recompile_time; + bool enabled; +}; + +struct HCache_interface *HCache; + +void HCache_defaults(void); + #endif /* _UTILS_H_ */ |