diff options
author | marha <marha@users.sourceforge.net> | 2014-09-21 18:14:18 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-09-21 18:14:18 +0200 |
commit | 4e080e0165d18887e2a0fccd7f30cf20fd04b178 (patch) | |
tree | dbefa5addb60abe7a5c52dbc1daea7d6e0c9d4d0 /libXfont/src/util | |
parent | e16399e57caac9e859a7d28921c73ef9839b571e (diff) | |
parent | d0f70707dde032e662dbd5bc70df6ac915403abe (diff) | |
download | vcxsrv-4e080e0165d18887e2a0fccd7f30cf20fd04b178.tar.gz vcxsrv-4e080e0165d18887e2a0fccd7f30cf20fd04b178.tar.bz2 vcxsrv-4e080e0165d18887e2a0fccd7f30cf20fd04b178.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
libXfont/src/fontfile/fontfile.c
libXfont/src/util/utilbitmap.c
Diffstat (limited to 'libXfont/src/util')
-rw-r--r-- | libXfont/src/util/Makefile.in | 2 | ||||
-rw-r--r-- | libXfont/src/util/atom.c | 4 | ||||
-rw-r--r-- | libXfont/src/util/fontaccel.c | 4 | ||||
-rw-r--r-- | libXfont/src/util/fontutil.c | 28 | ||||
-rw-r--r-- | libXfont/src/util/format.c | 22 | ||||
-rw-r--r-- | libXfont/src/util/miscutil.c | 14 | ||||
-rw-r--r-- | libXfont/src/util/patcache.c | 24 | ||||
-rw-r--r-- | libXfont/src/util/private.c | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | libXfont/src/util/utilbitmap.c | 20 |
9 files changed, 67 insertions, 55 deletions
diff --git a/libXfont/src/util/Makefile.in b/libXfont/src/util/Makefile.in index a1675f9d9..2b2c721d8 100644 --- a/libXfont/src/util/Makefile.in +++ b/libXfont/src/util/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14 from Makefile.am. +# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c index 37811f91e..5f7f1c66d 100644 --- a/libXfont/src/util/atom.c +++ b/libXfont/src/util/atom.c @@ -158,6 +158,8 @@ MakeAtom(const char *string, unsigned len, int makeit) int h = 0; int r; + OVERRIDE_SYMBOL(MakeAtom, string, len, makeit); + hash = Hash (string, len); if (hashTable) { @@ -230,6 +232,7 @@ MakeAtom(const char *string, unsigned len, int makeit) weak int ValidAtom(Atom atom) { + OVERRIDE_SYMBOL(ValidAtom, atom); return (atom != None) && (atom <= lastAtom); } @@ -240,6 +243,7 @@ ValidAtom(Atom atom) weak char * NameForAtom(Atom atom) { + OVERRIDE_SYMBOL(NameForAtom, atom); if (atom != None && atom <= lastAtom) return reverseMap[atom]->name; return NULL; diff --git a/libXfont/src/util/fontaccel.c b/libXfont/src/util/fontaccel.c index c5915dba9..db03e73b5 100644 --- a/libXfont/src/util/fontaccel.c +++ b/libXfont/src/util/fontaccel.c @@ -82,7 +82,7 @@ FontComputeInfoAccelerators(FontInfoPtr pFontInfo) pFontInfo->inkInside = FALSE; } -int +int FontCouldBeTerminal(FontInfoPtr pFontInfo) { if ((pFontInfo->minbounds.leftSideBearing >= 0) && @@ -95,7 +95,7 @@ FontCouldBeTerminal(FontInfoPtr pFontInfo) pFontInfo->minbounds.ascent != pFontInfo->fontAscent || pFontInfo->minbounds.descent != pFontInfo->fontDescent)) { /* blow off font with nothing but a SPACE */ - if (pFontInfo->maxbounds.ascent == 0 && + if (pFontInfo->maxbounds.ascent == 0 && pFontInfo->maxbounds.descent == 0) return FALSE; return TRUE; diff --git a/libXfont/src/util/fontutil.c b/libXfont/src/util/fontutil.c index 22f6119ae..2c5ea6f3b 100644 --- a/libXfont/src/util/fontutil.c +++ b/libXfont/src/util/fontutil.c @@ -45,10 +45,10 @@ static int defaultGlyphCachingMode = DEFAULT_GLYPH_CACHING_MODE; int glyphCachingMode = DEFAULT_GLYPH_CACHING_MODE; void -GetGlyphs(FontPtr font, - unsigned long count, - unsigned char *chars, - FontEncoding fontEncoding, +GetGlyphs(FontPtr font, + unsigned long count, + unsigned char *chars, + FontEncoding fontEncoding, unsigned long *glyphcount, /* RETURN */ CharInfoPtr *glyphs) /* RETURN */ { @@ -59,9 +59,9 @@ GetGlyphs(FontPtr font, #define MAX(a,b) ((a)>(b)?(a):(b)) void -QueryGlyphExtents(FontPtr pFont, - CharInfoPtr *charinfo, - unsigned long count, +QueryGlyphExtents(FontPtr pFont, + CharInfoPtr *charinfo, + unsigned long count, ExtentInfoRec *info) { register unsigned long i; @@ -131,9 +131,9 @@ QueryGlyphExtents(FontPtr pFont, } Bool -QueryTextExtents(FontPtr pFont, - unsigned long count, - unsigned char *chars, +QueryTextExtents(FontPtr pFont, + unsigned long count, + unsigned char *chars, ExtentInfoRec *info) { xCharInfo **charinfo; @@ -182,7 +182,7 @@ QueryTextExtents(FontPtr pFont, } cm = pFont->info.constantMetrics; pFont->info.constantMetrics = FALSE; - QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal, + QueryGlyphExtents(pFont, (CharInfoPtr*) charinfo + firstReal, n - firstReal, info); pFont->info.constantMetrics = cm; free(charinfo); @@ -227,9 +227,9 @@ SetGlyphCachingMode(int newmode) /* add_range(): Add range to a list of ranges, with coalescence */ int -add_range(fsRange *newrange, - int *nranges, - fsRange **range, +add_range(fsRange *newrange, + int *nranges, + fsRange **range, Bool charset_subset) { int first, last, middle; diff --git a/libXfont/src/util/format.c b/libXfont/src/util/format.c index f5424fe41..c1f9762fa 100644 --- a/libXfont/src/util/format.c +++ b/libXfont/src/util/format.c @@ -6,11 +6,11 @@ * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices or Digital - * not be used in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. Network Computing - * Devices and Digital make no representations about the suitability of - * this software for any purpose. It is provided "as is" without express + * documentation, and that the names of Network Computing Devices or Digital + * not be used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. Network Computing + * Devices and Digital make no representations about the suitability of + * this software for any purpose. It is provided "as is" without express * or implied warranty. * * NETWORK COMPUTING DEVICES AND DIGITAL DISCLAIM ALL WARRANTIES WITH @@ -59,12 +59,12 @@ from The Open Group. #include <X11/fonts/fontutil.h> int -CheckFSFormat(fsBitmapFormat format, - fsBitmapFormatMask fmask, - int *bit_order, - int *byte_order, - int *scan, - int *glyph, +CheckFSFormat(fsBitmapFormat format, + fsBitmapFormatMask fmask, + int *bit_order, + int *byte_order, + int *scan, + int *glyph, int *image) { /* convert format to what the low levels want */ diff --git a/libXfont/src/util/miscutil.c b/libXfont/src/util/miscutil.c index 3d802d2f5..631748f67 100644 --- a/libXfont/src/util/miscutil.c +++ b/libXfont/src/util/miscutil.c @@ -45,14 +45,22 @@ from The Open Group. extern void BuiltinRegisterFpeFunctions(void); -#ifndef NO_WEAK_SYMBOLS /* make sure everything initializes themselves at least once */ -weak unsigned long serverGeneration = 1; -#endif +extern unsigned long serverGeneration; + +unsigned long __GetServerGeneration (void); + +unsigned long +__GetServerGeneration (void) +{ + OVERRIDE_DATA(serverGeneration); + return serverGeneration; +} weak void register_fpe_functions (void) { + OVERRIDE_SYMBOL(register_fpe_functions); BuiltinRegisterFpeFunctions(); FontFileRegisterFpeFunctions(); #ifdef XFONT_FC diff --git a/libXfont/src/util/patcache.c b/libXfont/src/util/patcache.c index 548105a00..210101584 100644 --- a/libXfont/src/util/patcache.c +++ b/libXfont/src/util/patcache.c @@ -50,7 +50,7 @@ typedef unsigned char EntryPtr; typedef struct _FontPatternCacheEntry { struct _FontPatternCacheEntry *next, **prev; short patlen; - char *pattern; + const char *pattern; int hash; FontPtr pFont; /* associated font */ } FontPatternCacheEntryRec, *FontPatternCacheEntryPtr; @@ -66,7 +66,7 @@ void EmptyFontPatternCache (FontPatternCachePtr cache) { int i; - + for (i = 0; i < NBUCKETS; i++) cache->buckets[i] = 0; for (i = 0; i < NENTRIES; i++) @@ -74,7 +74,7 @@ EmptyFontPatternCache (FontPatternCachePtr cache) cache->entries[i].next = &cache->entries[i+1]; cache->entries[i].prev = 0; cache->entries[i].pFont = 0; - free (cache->entries[i].pattern); + free ((void *) cache->entries[i].pattern); cache->entries[i].pattern = 0; cache->entries[i].patlen = 0; } @@ -107,7 +107,7 @@ FreeFontPatternCache (FontPatternCachePtr cache) int i; for (i = 0; i < NENTRIES; i++) - free (cache->entries[i].pattern); + free ((void *) cache->entries[i].pattern); free (cache); } @@ -127,9 +127,9 @@ Hash (const char *string, int len) /* add entry */ void -CacheFontPattern (FontPatternCachePtr cache, - char *pattern, - int patlen, +CacheFontPattern (FontPatternCachePtr cache, + const char *pattern, + int patlen, FontPtr pFont) { FontPatternCacheEntryPtr e; @@ -154,7 +154,7 @@ CacheFontPattern (FontPatternCachePtr cache, if (e->next) e->next->prev = e->prev; *e->prev = e->next; - free (e->pattern); + free ((void *) e->pattern); } /* set pattern */ memcpy (newpat, pattern, patlen); @@ -173,8 +173,8 @@ CacheFontPattern (FontPatternCachePtr cache, /* find matching entry */ FontPtr -FindCachedFontPattern (FontPatternCachePtr cache, - char *pattern, +FindCachedFontPattern (FontPatternCachePtr cache, + const char *pattern, int patlen) { int hash; @@ -195,7 +195,7 @@ FindCachedFontPattern (FontPatternCachePtr cache, } void -RemoveCachedFontPattern (FontPatternCachePtr cache, +RemoveCachedFontPattern (FontPatternCachePtr cache, FontPtr pFont) { FontPatternCacheEntryPtr e; @@ -211,7 +211,7 @@ RemoveCachedFontPattern (FontPatternCachePtr cache, *e->prev = e->next; e->next = cache->free; cache->free = e; - free (e->pattern); + free ((void *) e->pattern); e->pattern = 0; } } diff --git a/libXfont/src/util/private.c b/libXfont/src/util/private.c index 36715b1fa..e55e19368 100644 --- a/libXfont/src/util/private.c +++ b/libXfont/src/util/private.c @@ -42,7 +42,7 @@ AllocateFontPrivateIndex (void) return _FontPrivateAllocateIndex++; } -FontPtr +FontPtr CreateFontRec (void) { FontPtr pFont; @@ -51,7 +51,7 @@ CreateFontRec (void) size = sizeof(FontRec) + (sizeof(pointer) * _FontPrivateAllocateIndex); pFont = malloc(size); - + if(pFont) { bzero((char*)pFont, size); pFont->maxPrivate = _FontPrivateAllocateIndex - 1; diff --git a/libXfont/src/util/utilbitmap.c b/libXfont/src/util/utilbitmap.c index 619f72eaa..3790365ee 100644..100755 --- a/libXfont/src/util/utilbitmap.c +++ b/libXfont/src/util/utilbitmap.c @@ -38,8 +38,8 @@ in this Software without prior written authorization from The Open Group. */ int -RepadBitmap (char *pSrc, char *pDst, - unsigned int srcPad, unsigned int dstPad, +RepadBitmap (char *pSrc, char *pDst, + unsigned int srcPad, unsigned int dstPad, int width, int height) { int srcWidthBytes,dstWidthBytes; @@ -47,33 +47,33 @@ RepadBitmap (char *pSrc, char *pDst, char *pTmpSrc,*pTmpDst; switch (srcPad) { - case 1: + case 1: srcWidthBytes = (width+7)>>3; break; case 2: srcWidthBytes = ((width+15)>>4)<<1; break; - case 4: + case 4: srcWidthBytes = ((width+31)>>5)<<2; break; - case 8: - srcWidthBytes = ((width+63)>>6)<<3; + case 8: + srcWidthBytes = ((width+63)>>6)<<3; break; default: return 0; } switch (dstPad) { - case 1: + case 1: dstWidthBytes = (width+7)>>3; break; case 2: dstWidthBytes = ((width+15)>>4)<<1; break; - case 4: + case 4: dstWidthBytes = ((width+31)>>5)<<2; break; - case 8: - dstWidthBytes = ((width+63)>>6)<<3; + case 8: + dstWidthBytes = ((width+63)>>6)<<3; break; default: return 0; |