Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/fontconfig/dist/src deal with vax exponent limit



details:   https://anonhg.NetBSD.org/xsrc/rev/e1ff0b7588a1
branches:  trunk
changeset: 7400:e1ff0b7588a1
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 22 20:47:13 2023 +0000

description:
deal with vax exponent limit

diffstat:

 external/mit/fontconfig/dist/src/fcmatch.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 85c369fc171e -r e1ff0b7588a1 external/mit/fontconfig/dist/src/fcmatch.c
--- a/external/mit/fontconfig/dist/src/fcmatch.c        Sun Jan 22 19:57:59 2023 +0000
+++ b/external/mit/fontconfig/dist/src/fcmatch.c        Sun Jan 22 20:47:13 2023 +0000
@@ -26,6 +26,12 @@
 #include <float.h>
 
 
+#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 @@
             if (!FcHashTableFind (table, key, (void **)&e))
             {
                 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 @@
 
     assert (table != NULL);
 
-    strong_value = 1e99;
-    weak_value = 1e99;
+    strong_value = SENTINEL;
+    weak_value = SENTINEL;
 
     for (v2 = v2orig; v2; v2 = FcValueListNext(v2))
     {



Home | Main Index | Thread Index | Old Index