diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-05 14:27:29 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2010-03-05 14:27:29 +0000 |
commit | 9a3a1f01b7bac115aa536b3b6062ab703b108c31 (patch) | |
tree | 0722221f2ec49283b46ee65bc20153a05c86455f /Build/source/texk/web2c/cpascal.h | |
parent | c1c0af52552e4b0c8a24acb36de9ca4705468da5 (diff) |
gftype: dynamic array allocation
git-svn-id: svn://tug.org/texlive/trunk@17332 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/cpascal.h')
-rw-r--r-- | Build/source/texk/web2c/cpascal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/cpascal.h b/Build/source/texk/web2c/cpascal.h index 9d18fbc58cc..b1e96ac5473 100644 --- a/Build/source/texk/web2c/cpascal.h +++ b/Build/source/texk/web2c/cpascal.h @@ -159,6 +159,8 @@ typedef unsigned char *pointertobyte; #define xmallocarray(type,size) ((type*)xmalloc((size+1)*sizeof(type))) /* Same for reallocating an array. */ #define xreallocarray(ptr,type,size) ((type*)xrealloc(ptr,(size+1)*sizeof(type))) +/* Allocate and clear an array of a given type. Add 1 to nmemb and size. */ +#define xcallocarray(type,nmemb,size) ((type*)xcalloc(nmemb+1,(size+1)*sizeof(type))) /* BibTeX needs this to dynamically reallocate arrays. Too bad we can't rely on stringification, or we could avoid the ARRAY_NAME arg. |