Annotation of /trunk/cups/patches/xpdf-goo-sizet.patch
Parent Directory | Revision Log
Revision 144 -
(hide annotations)
(download)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1424 byte(s)
Tue May 8 20:06:05 2007 UTC (17 years, 4 months ago) by niro
File size: 1424 byte(s)
-import
1 | niro | 144 | diff -ru xpdf-2.02pl1/goo/gmem.c xpdf-2.02pl1/goo/gmem.c |
2 | --- xpdf-2.02pl1/goo/gmem.c 2003-06-16 22:01:26.000000000 +0200 | ||
3 | +++ xpdf-2.02pl1/goo/gmem.c 2004-10-29 15:13:34.866919791 +0200 | ||
4 | @@ -53,9 +53,9 @@ | ||
5 | |||
6 | #endif /* DEBUG_MEM */ | ||
7 | |||
8 | -void *gmalloc(int size) { | ||
9 | +void *gmalloc(size_t size) { | ||
10 | #ifdef DEBUG_MEM | ||
11 | - int size1; | ||
12 | + size_t size1; | ||
13 | char *mem; | ||
14 | GMemHdr *hdr; | ||
15 | void *data; | ||
16 | @@ -94,11 +94,11 @@ | ||
17 | #endif | ||
18 | } | ||
19 | |||
20 | -void *grealloc(void *p, int size) { | ||
21 | +void *grealloc(void *p, size_t size) { | ||
22 | #ifdef DEBUG_MEM | ||
23 | GMemHdr *hdr; | ||
24 | void *q; | ||
25 | - int oldSize; | ||
26 | + size_t oldSize; | ||
27 | |||
28 | if (size == 0) { | ||
29 | if (p) | ||
30 | @@ -137,7 +137,7 @@ | ||
31 | |||
32 | void gfree(void *p) { | ||
33 | #ifdef DEBUG_MEM | ||
34 | - int size; | ||
35 | + size_t size; | ||
36 | GMemHdr *hdr; | ||
37 | GMemHdr *prevHdr, *q; | ||
38 | int lst; | ||
39 | diff -ru xpdf-2.02pl1/goo/gmem.h xpdf-2.02pl1/goo/gmem.h | ||
40 | --- xpdf-2.02pl1/goo/gmem.h 2003-06-16 22:01:26.000000000 +0200 | ||
41 | +++ xpdf-2.02pl1/goo/gmem.h 2004-10-29 15:13:50.864027201 +0200 | ||
42 | @@ -19,13 +19,13 @@ | ||
43 | * Same as malloc, but prints error message and exits if malloc() | ||
44 | * returns NULL. | ||
45 | */ | ||
46 | -extern void *gmalloc(int size); | ||
47 | +extern void *gmalloc(size_t size); | ||
48 | |||
49 | /* | ||
50 | * Same as realloc, but prints error message and exits if realloc() | ||
51 | * returns NULL. If <p> is NULL, calls malloc instead of realloc(). | ||
52 | */ | ||
53 | -extern void *grealloc(void *p, int size); | ||
54 | +extern void *grealloc(void *p, size_t size); | ||
55 | |||
56 | /* | ||
57 | * Same as free, but checks for and ignores NULL pointers. |