From: res Date: Mon, 17 Dec 2007 03:34:31 +0000 (+0000) Subject: Dynamically allocate Q3 shader texture frames. X-Git-Tag: xonotic-v0.1.0preview~2683 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74bc8ee087b864d7d115527f2bf6b5f98ba35e0d;p=xonotic%2Fdarkplaces.git Dynamically allocate Q3 shader texture frames. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7808 d7cf8633-e32d-0410-b094-e92efae38249 --- 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;