From 74bc8ee087b864d7d115527f2bf6b5f98ba35e0d Mon Sep 17 00:00:00 2001 From: res Date: Mon, 17 Dec 2007 03:34:31 +0000 Subject: [PATCH] Dynamically allocate Q3 shader texture frames. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7808 d7cf8633-e32d-0410-b094-e92efae38249 --- zone.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/zone.h b/zone.h index cd196623..a71916c0 100644 --- 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); +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; -- 2.39.2