Annotation of /trunk/libXfont/patches/libXfont-1.4.8-fontsproto213.patch
Parent Directory | Revision Log
Revision 2439 -
(hide annotations)
(download)
Wed Jun 18 09:10:21 2014 UTC (10 years ago) by niro
File size: 2030 byte(s)
Wed Jun 18 09:10:21 2014 UTC (10 years ago) by niro
File size: 2030 byte(s)
-fix build against fontsproto-2.1.3
1 | niro | 2439 | diff --git a/src/util/patcache.c b/src/util/patcache.c |
2 | index 9c05fa1..2101015 100644 | ||
3 | --- a/src/util/patcache.c | ||
4 | +++ b/src/util/patcache.c | ||
5 | @@ -50,7 +50,7 @@ typedef unsigned char EntryPtr; | ||
6 | typedef struct _FontPatternCacheEntry { | ||
7 | struct _FontPatternCacheEntry *next, **prev; | ||
8 | short patlen; | ||
9 | - char *pattern; | ||
10 | + const char *pattern; | ||
11 | int hash; | ||
12 | FontPtr pFont; /* associated font */ | ||
13 | } FontPatternCacheEntryRec, *FontPatternCacheEntryPtr; | ||
14 | @@ -74,7 +74,7 @@ EmptyFontPatternCache (FontPatternCachePtr cache) | ||
15 | cache->entries[i].next = &cache->entries[i+1]; | ||
16 | cache->entries[i].prev = 0; | ||
17 | cache->entries[i].pFont = 0; | ||
18 | - free (cache->entries[i].pattern); | ||
19 | + free ((void *) cache->entries[i].pattern); | ||
20 | cache->entries[i].pattern = 0; | ||
21 | cache->entries[i].patlen = 0; | ||
22 | } | ||
23 | @@ -107,7 +107,7 @@ FreeFontPatternCache (FontPatternCachePtr cache) | ||
24 | int i; | ||
25 | |||
26 | for (i = 0; i < NENTRIES; i++) | ||
27 | - free (cache->entries[i].pattern); | ||
28 | + free ((void *) cache->entries[i].pattern); | ||
29 | free (cache); | ||
30 | } | ||
31 | |||
32 | @@ -128,7 +128,7 @@ Hash (const char *string, int len) | ||
33 | /* add entry */ | ||
34 | void | ||
35 | CacheFontPattern (FontPatternCachePtr cache, | ||
36 | - char *pattern, | ||
37 | + const char *pattern, | ||
38 | int patlen, | ||
39 | FontPtr pFont) | ||
40 | { | ||
41 | @@ -154,7 +154,7 @@ CacheFontPattern (FontPatternCachePtr cache, | ||
42 | if (e->next) | ||
43 | e->next->prev = e->prev; | ||
44 | *e->prev = e->next; | ||
45 | - free (e->pattern); | ||
46 | + free ((void *) e->pattern); | ||
47 | } | ||
48 | /* set pattern */ | ||
49 | memcpy (newpat, pattern, patlen); | ||
50 | @@ -174,7 +174,7 @@ CacheFontPattern (FontPatternCachePtr cache, | ||
51 | /* find matching entry */ | ||
52 | FontPtr | ||
53 | FindCachedFontPattern (FontPatternCachePtr cache, | ||
54 | - char *pattern, | ||
55 | + const char *pattern, | ||
56 | int patlen) | ||
57 | { | ||
58 | int hash; | ||
59 | @@ -211,7 +211,7 @@ RemoveCachedFontPattern (FontPatternCachePtr cache, | ||
60 | *e->prev = e->next; | ||
61 | e->next = cache->free; | ||
62 | cache->free = e; | ||
63 | - free (e->pattern); | ||
64 | + free ((void *) e->pattern); | ||
65 | e->pattern = 0; | ||
66 | } | ||
67 | } | ||
68 | -- | ||
69 | cgit v0.9.0.2-2-gbebe | ||
70 |