]> mj.ucw.cz Git - libucw.git/blobdiff - lib/pools.h
Added mp_strcat() and mp_multicat().
[libucw.git] / lib / pools.h
index ff9250dcb5f3d0d7dd80f0ef4e5ccb5abe62b684..540e8e60cc690bb939d10b700735b295ededa1ca 100644 (file)
@@ -26,7 +26,6 @@ void mp_delete(struct mempool *);
 void mp_flush(struct mempool *);
 void *mp_alloc(struct mempool *, uns);
 void *mp_alloc_zero(struct mempool *, uns);
-char *mp_strdup(struct mempool *, char *);
 
 static inline void *mp_alloc_fast(struct mempool *p, uns l)
 {
@@ -61,4 +60,14 @@ mp_end_string(struct mempool *p, void *stop)
   p->free = stop;
 }
 
+/* pool-str.c */
+
+char *mp_strdup(struct mempool *, char *);
+char *mp_multicat(struct mempool *, ...);
+static inline char *
+mp_strcat(struct mempool *mp, char *x, char *y)
+{
+  mp_multicat(mp, x, y, NULL);
+}
+
 #endif