summaryrefslogtreecommitdiffstats
path: root/utils/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/utils.h')
-rw-r--r--utils/utils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h
index 7693b5c..3362c10 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -327,6 +327,13 @@ extern struct gbConf gbConf;
gbStrdup(&(dst), src, \
__FILE__, __FUNCTION__, __LINE__)
+# define GB_STRCPY(dst, src, destbytes) \
+ gbStrcpy((dst), (src), (destbytes), \
+ __FILE__, __FUNCTION__, __LINE__)
+
+# define GB_STRCPYSTATIC(dst, src) \
+ GB_STRCPY((dst), (src), (sizeof(dst)))
+
# define GB_FREE(ptr) \
gbFree(1 ? (void *) &(ptr) : (ptr))
@@ -532,6 +539,9 @@ int gbReallocN(void *ptrptr, size_t size, size_t count,
int gbStrdup(char **dest, const char *src,
const char *filename, const char *funcname, size_t linenr);
+char* gbStrcpy(char *dest, const char *src, size_t destbytes,
+ const char *filename, const char *funcname, size_t linenr);
+
void gbFree(void *ptrptr);
#endif /* _UTILS_H */