X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2Fxpdf%2Fgmem.h;h=e74d182231839e8f75a40c943286680e7ca8b434;hb=3de83640b8a9cfd821efc91a73952278fa69f8fc;hp=732726d42c08bbb60f0217d2a34c3b868e0b3d93;hpb=fc554a43712b76d16b41ec77dd311b4a78b1ef6b;p=swftools.git diff --git a/pdf2swf/xpdf/gmem.h b/pdf2swf/xpdf/gmem.h index 732726d..e74d182 100644 --- a/pdf2swf/xpdf/gmem.h +++ b/pdf2swf/xpdf/gmem.h @@ -3,14 +3,13 @@ * * Memory routines with out-of-memory checking. * - * Copyright 1996 Derek B. Noonburg + * Copyright 1996-2003 Glyph & Cog, LLC */ #ifndef GMEM_H #define GMEM_H #include -#include "../../config.h" #ifdef __cplusplus extern "C" { @@ -29,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);