X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2Fgmem.h;h=e74d182231839e8f75a40c943286680e7ca8b434;hb=706eaa27c94e5ebd9912ffadeeaa0e4656e10bc3;hp=93ccb94be13605304df354e37366c0708b4b58eb;hpb=50dd339d3d6262763616efe8d7ee415ab19befb9;p=swftools.git diff --git a/pdf2swf/xpdf/gmem.h b/pdf2swf/xpdf/gmem.h index 93ccb94..e74d182 100644 --- a/pdf2swf/xpdf/gmem.h +++ b/pdf2swf/xpdf/gmem.h @@ -3,7 +3,7 @@ * * Memory routines with out-of-memory checking. * - * Copyright 1996-2002 Glyph & Cog, LLC + * Copyright 1996-2003 Glyph & Cog, LLC */ #ifndef GMEM_H @@ -28,6 +28,15 @@ extern void *gmalloc(int size); extern void *grealloc(void *p, int size); /* + * These are similar to gmalloc and grealloc, but take an object count + * and size. The result is similar to allocating nObjs * objSize + * bytes, but there is an additional error check that the total size + * doesn't overflow an int. + */ +extern void *gmallocn(int nObjs, int objSize); +extern void *greallocn(void *p, int nObjs, int objSize); + +/* * Same as free, but checks for and ignores NULL pointers. */ extern void gfree(void *p);