CVS commit: xsrc/external/mit/fontconfig/dist/src
Module Name:xsrc Committed By: christos Date: Sun Jan 22 20:47:13 UTC 2023 Modified Files: xsrc/external/mit/fontconfig/dist/src: fcmatch.c Log Message: deal with vax exponent limit To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 xsrc/external/mit/fontconfig/dist/src/fcmatch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/fontconfig/dist/src/fcmatch.c diff -u xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.12 xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.13 --- xsrc/external/mit/fontconfig/dist/src/fcmatch.c:1.12 Thu Jan 19 01:14:18 2023 +++ xsrc/external/mit/fontconfig/dist/src/fcmatch.c Sun Jan 22 15:47:13 2023 @@ -26,6 +26,12 @@ #include +#ifdef __vax__ +#define SENTINEL 1e38 +#else +#define SENTINEL 1e99 +#endif + static double FcCompareNumber (const FcValue *value1, const FcValue *value2, FcValue *bestValue) { @@ -536,8 +542,8 @@ FcCompareDataInit (FcPattern *pat, if (!FcHashTableFind (table, key, (void **))) { e = malloc (sizeof (FamilyEntry)); -e->strong_value = 1e99; -e->weak_value = 1e99; +e->strong_value = SENTINEL; +e->weak_value = SENTINEL; FcHashTableAdd (table, (void *)key, e); } if (l->binding == FcValueBindingWeak) @@ -573,8 +579,8 @@ FcCompareFamilies (FcPattern *pat, assert (table != NULL); -strong_value = 1e99; -weak_value = 1e99; +strong_value = SENTINEL; +weak_value = SENTINEL; for (v2 = v2orig; v2; v2 = FcValueListNext(v2)) {
CVS commit: xsrc/external/mit/fontconfig/dist/src
Module Name:xsrc Committed By: christos Date: Sun Jan 22 20:47:13 UTC 2023 Modified Files: xsrc/external/mit/fontconfig/dist/src: fcmatch.c Log Message: deal with vax exponent limit To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 xsrc/external/mit/fontconfig/dist/src/fcmatch.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/fontconfig/dist/src
Module Name:xsrc Committed By: nakayama Date: Thu May 16 09:59:37 UTC 2019 Modified Files: xsrc/external/mit/fontconfig/dist/src: fcdir.c Log Message: Do not remove UUID file when a scanned directory is empty. pulled from the following upstream change: https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/5f12f564f8748deaa603adb7a4b8f616b6390ad4 It fixes that a cache file for an empty font directory is created every time fc-cache is executed. To generate a diff of this commit: cvs rdiff -u -r1.1.1.8 -r1.2 xsrc/external/mit/fontconfig/dist/src/fcdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/fontconfig/dist/src/fcdir.c diff -u xsrc/external/mit/fontconfig/dist/src/fcdir.c:1.1.1.8 xsrc/external/mit/fontconfig/dist/src/fcdir.c:1.2 --- xsrc/external/mit/fontconfig/dist/src/fcdir.c:1.1.1.8 Fri Mar 8 09:40:41 2019 +++ xsrc/external/mit/fontconfig/dist/src/fcdir.c Thu May 16 09:59:37 2019 @@ -421,13 +421,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBo /* Not using existing cache file, construct new cache */ if (!cache) cache = FcDirCacheScan (dir, config); -if (cache) -{ - FcFontSet *fs = FcCacheSet (cache); - - if (cache->dirs_count == 0 && (!fs || fs->nfont == 0)) - FcDirCacheDeleteUUID (dir, config); -} return cache; }
CVS commit: xsrc/external/mit/fontconfig/dist/src
Module Name:xsrc Committed By: nakayama Date: Thu May 16 09:59:37 UTC 2019 Modified Files: xsrc/external/mit/fontconfig/dist/src: fcdir.c Log Message: Do not remove UUID file when a scanned directory is empty. pulled from the following upstream change: https://gitlab.freedesktop.org/fontconfig/fontconfig/commit/5f12f564f8748deaa603adb7a4b8f616b6390ad4 It fixes that a cache file for an empty font directory is created every time fc-cache is executed. To generate a diff of this commit: cvs rdiff -u -r1.1.1.8 -r1.2 xsrc/external/mit/fontconfig/dist/src/fcdir.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: xsrc/external/mit/fontconfig/dist/src
On Thu, Jun 27, 2013 at 12:44:11 +, Thomas Klausner wrote: Modified Files: xsrc/external/mit/fontconfig/dist/src: fcname.c Log Message: Fix a comparison of constant warning with clang From upstream: commit 9acc14c34a372b54f9075ec3611588298fb2a501 Author: Akira TAGOH ak...@tagoh.org Date: Wed Jun 26 12:03:38 2013 +0900 Their fix is incorrect. - if (t-type == (unsigned int) -1 || type == t-type) + if ((unsigned int) t-type == (unsigned int) -1 || type == t-type) it does wrong thing with short enums, and non-eabi arm ports still use it, as far as I understand. The enum in question contains only small values, so with -fshort-enums (default for older arms ABIs) gcc will use the narrowest integral type that can hold all the values, in this case single byte is enough, and (though I don't remember chapter and verse) it's likely to be unsigned. Thus t-type = -1; will be converted to uint8_t and stored as 0xff, and when cast to unsigned int it will be 0xff, so it will NOT compare equal with (unsigned int)-1 Consider something like: #include stdio.h enum e { E0, E1 }; volatile enum e e; int main(void) { printf(sizeof enum = %zu\n, sizeof(e)); e = -1; if ((unsigned int)e == (unsigned int)-1) { printf(equal\n); } else { printf(NOT equal\n); } return 0; } $ cc -Wall -Wextra enum.c ./a.out sizeof enum = 4 equal $ cc -Wall -Wextra -fshort-enums enum.c ./a.out enum.c: In function 'main': enum.c:12:5: warning: comparison is always false due to limited range of data type sizeof enum = 1 NOT equal -1 should really be in the enum as one of the enumeration constants. -uwe
Re: CVS commit: xsrc/external/mit/fontconfig/dist/src
On Thu, Jun 27, 2013 at 07:40:32PM +0400, Valery Ushakov wrote: -1 should really be in the enum as one of the enumeration constants. Indeed, and then the enumerator name should be used instead of the stupid -1 constant. Martin