View | Details | Raw Unified
Collapse All | Expand All

(-) xpdf-2.02pl1/goo/gmem.c (-5 / +5 lines)
 Lines 53-61    Link Here 
#endif /* DEBUG_MEM */
#endif /* DEBUG_MEM */
void *gmalloc(int size) {
void *gmalloc(size_t size) {
#ifdef DEBUG_MEM
#ifdef DEBUG_MEM
  int size1;
  size_t size1;
  char *mem;
  char *mem;
  GMemHdr *hdr;
  GMemHdr *hdr;
  void *data;
  void *data;
 Lines 94-104    Link Here 
#endif
#endif
}
}
void *grealloc(void *p, int size) {
void *grealloc(void *p, size_t size) {
#ifdef DEBUG_MEM
#ifdef DEBUG_MEM
  GMemHdr *hdr;
  GMemHdr *hdr;
  void *q;
  void *q;
  int oldSize;
  size_t oldSize;
  if (size == 0) {
  if (size == 0) {
    if (p)
    if (p)
 Lines 137-143    Link Here 
void gfree(void *p) {
void gfree(void *p) {
#ifdef DEBUG_MEM
#ifdef DEBUG_MEM
  int size;
  size_t size;
  GMemHdr *hdr;
  GMemHdr *hdr;
  GMemHdr *prevHdr, *q;
  GMemHdr *prevHdr, *q;
  int lst;
  int lst;
(-) xpdf-2.02pl1/goo/gmem.h (-2 / +2 lines)
 Lines 19-31    Link Here 
 * Same as malloc, but prints error message and exits if malloc()
 * Same as malloc, but prints error message and exits if malloc()
 * returns NULL.
 * returns NULL.
 */
 */
extern void *gmalloc(int size);
extern void *gmalloc(size_t size);
/*
/*
 * Same as realloc, but prints error message and exits if realloc()
 * Same as realloc, but prints error message and exits if realloc()
 * returns NULL.  If <p> is NULL, calls malloc instead of realloc().
 * returns NULL.  If <p> is NULL, calls malloc instead of realloc().
 */
 */
extern void *grealloc(void *p, int size);
extern void *grealloc(void *p, size_t size);
/*
/*
 * Same as free, but checks for and ignores NULL pointers.
 * Same as free, but checks for and ignores NULL pointers.