]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Dynamically allocate Q3 shader texture frames.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 03:34:31 +0000 (03:34 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 03:34:31 +0000 (03:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7808 d7cf8633-e32d-0410-b094-e92efae38249

zone.h

diff --git a/zone.h b/zone.h
index cd1966231570083eef3e56fde6fab5f875a7befd..a71916c01eb051eef386c07b26af1ed3b0573bbb 100644 (file)
--- a/zone.h
+++ b/zone.h
@@ -135,6 +135,15 @@ void _Mem_CheckSentinelsGlobal(const char *filename, int fileline);
 // if pool is NULL this searches ALL pools for the allocation
 qboolean Mem_IsAllocated(mempool_t *pool, void *data);
 
 // if pool is NULL this searches ALL pools for the allocation
 qboolean Mem_IsAllocated(mempool_t *pool, void *data);
 
+static char* Mem_strdup (mempool_t *pool, const char* s)
+{
+       char* p;
+       if (s == NULL) return NULL;
+       p = (char*)Mem_Alloc (pool, strlen (s) + 1);
+       strcpy (p, s);
+       return p;
+}
+
 typedef struct memexpandablearray_array_s
 {
        unsigned char *data;
 typedef struct memexpandablearray_array_s
 {
        unsigned char *data;