summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-19 02:41:24 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-19 02:41:24 +0000
commit45a388cf0c7a1616dd10dba5b9cb5cd07ef47c27 (patch)
tree061471d91a31e50c08dfed97a61c05d0e91404c0 /src/common/utils.h
parent3c234c05cfde1c26bbb44b5a0cea3409fc0d4f13 (diff)
downloadhercules-45a388cf0c7a1616dd10dba5b9cb5cd07ef47c27.tar.gz
hercules-45a388cf0c7a1616dd10dba5b9cb5cd07ef47c27.tar.bz2
hercules-45a388cf0c7a1616dd10dba5b9cb5cd07ef47c27.tar.xz
hercules-45a388cf0c7a1616dd10dba5b9cb5cd07ef47c27.zip
guild_cache
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@619 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index c8efd525b..d234e9351 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,3 +1,6 @@
+#ifndef COMMON_UTILS_H
+#define COMMON_UTILS_H
+
#ifndef NULL
#define NULL (void *)0
@@ -31,3 +34,18 @@
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 char * StringBuf_Value(struct StringBuf *);
+extern void StringBuf_Destroy(struct StringBuf *);
+extern void StringBuf_Free(struct StringBuf *);
+
+#endif