
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
31 lines
949 B
C
31 lines
949 B
C
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
|
|
// For more information, see LICENCE in the main folder
|
|
|
|
#ifndef _UTILS_H_
|
|
#define _UTILS_H_
|
|
|
|
#ifndef _CBASETYPES_H_
|
|
#include "../common/cbasetypes.h"
|
|
#endif
|
|
|
|
#include <stdio.h> // FILE*
|
|
|
|
// generate a hex dump of the first 'length' bytes of 'buffer'
|
|
void dump(FILE* fp, const unsigned char* buffer, int length);
|
|
|
|
void findfile(const char *p, const char *pat, void (func)(const char*));
|
|
|
|
//Caps values to min/max
|
|
#define cap_value(a, min, max) ((a >= max) ? max : (a <= min) ? min : a)
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// byte word dword access [Shinomori]
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
extern uint8 GetByte(uint32 val, int idx);
|
|
extern uint16 GetWord(uint32 val, int idx);
|
|
extern uint16 MakeWord(uint8 byte0, uint8 byte1);
|
|
extern uint32 MakeDWord(uint16 word0, uint16 word1);
|
|
|
|
#endif /* _UTILS_H_ */
|