summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 06:54:02 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-05 06:54:02 +0000
commitf4b3dff16a0b23c915cfae1de150b0943db83620 (patch)
tree7019bc8f7c4356410d199b0058f1e5e2b41a2089 /src/common/utils.h
parentcf5a6282cace4f9b4d788909a00f6c6e0057acfe (diff)
downloadhercules-f4b3dff16a0b23c915cfae1de150b0943db83620.tar.gz
hercules-f4b3dff16a0b23c915cfae1de150b0943db83620.tar.bz2
hercules-f4b3dff16a0b23c915cfae1de150b0943db83620.tar.xz
hercules-f4b3dff16a0b23c915cfae1de150b0943db83620.zip
added debugging
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@456 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index c8efd525b..f6ea8e006 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,3 +1,5 @@
+#ifndef UTILS_H
+#define UTILS_H
#ifndef NULL
#define NULL (void *)0
@@ -18,8 +20,7 @@
#endif
- void dump(unsigned char *buffer, int num);
-
+void dump(unsigned char *buffer, int num);
#define CREATE(result, type, number) do {\
if ((number) * sizeof(type) <= 0) \
@@ -31,3 +32,17 @@
if (!((result) = (type *) realloc ((result), sizeof(type) * (number))))\
{ printf("SYSERR: realloc failure"); abort(); } } while(0)
+struct StringBuf {
+ char *buf_;
+ char *ptr_;
+ unsigned int max_;
+};
+
+extern struct StringBuf * StringBuf_Malloc();
+extern void StringBuf_Init(struct StringBuf *);
+extern int StringBuf_Printf(struct StringBuf *,const char *,...);
+extern int StringBuf_Append(struct StringBuf *,const struct StringBuf *);
+extern void StringBuf_Destroy(struct StringBuf *);
+extern void StringBuf_Free(struct StringBuf *);
+
+#endif