summaryrefslogtreecommitdiff
path: root/src/common/strlib.h
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-02 20:19:40 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-06-02 20:19:40 +0000
commit85db2023cb033928a190ac7fa6f05b5d6cbad14a (patch)
treeb37ec6dab700ae4170968f10ccf0136242ee5f23 /src/common/strlib.h
parentc6f3f3b4d8e95e130af32ea24d3e30130688eab8 (diff)
downloadhercules-85db2023cb033928a190ac7fa6f05b5d6cbad14a.tar.gz
hercules-85db2023cb033928a190ac7fa6f05b5d6cbad14a.tar.bz2
hercules-85db2023cb033928a190ac7fa6f05b5d6cbad14a.tar.xz
hercules-85db2023cb033928a190ac7fa6f05b5d6cbad14a.zip
* Displaying op names instead of numbers in script engine errors.
* Fixed a bug introduced in the last rework of the fame ranking. * Created safestrncpy that ensures the string is nul-terminated. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10667 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/strlib.h')
-rw-r--r--src/common/strlib.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/strlib.h b/src/common/strlib.h
index a3753b918..42fb75ab2 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -4,7 +4,9 @@
#ifndef _STRLIB_H_
#define _STRLIB_H_
-#include <stddef.h> // size_t
+#ifndef _CBASETYPES_H_
+#include "../common/cbasetypes.h"
+#endif
char* jstrescape (char* pt);
char* jstrescapecpy (char* pt, const char* spt);
@@ -15,7 +17,7 @@ char* trim(char* str);
char* normalize_name(char* str,const char* delims);
const char *stristr(const char *haystack, const char *needle);
-#ifdef __WIN32
+#ifdef WIN32
#define HAVE_STRTOK_R
#define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
char* _strtok_r(char* s1, const char* s2, char** lasts);
@@ -28,4 +30,7 @@ size_t strnlen (const char* string, size_t maxlen);
int e_mail_check(char* email);
int config_switch(const char* str);
+/// always nul-terminates the string
+char* safestrncpy(char* dst, const char* src, size_t n);
+
#endif /* _STRLIB_H_ */