Module Name:    xsrc
Committed By:   mrg
Date:           Sun Jan  8 06:03:45 UTC 2023

Modified Files:
        xsrc/external/mit/libXft/dist/src: xftglyphs.c
        xsrc/external/mit/libXpm/dist/src: create.c
        xsrc/external/mit/libXrandr/dist: compile
        xsrc/external/mit/libXrandr/dist/src: XrrProvider.c

Log Message:
merge libXft 2.3.7, libXpm 3.5.14, and libXrandr 1.5.3.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libXft/dist/src/xftglyphs.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXpm/dist/src/create.c
cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libXrandr/dist/compile
cvs rdiff -u -r1.9 -r1.10 xsrc/external/mit/libXrandr/dist/src/XrrProvider.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/libXft/dist/src/xftglyphs.c
diff -u xsrc/external/mit/libXft/dist/src/xftglyphs.c:1.5 xsrc/external/mit/libXft/dist/src/xftglyphs.c:1.6
--- xsrc/external/mit/libXft/dist/src/xftglyphs.c:1.5	Fri Sep  9 23:18:56 2022
+++ xsrc/external/mit/libXft/dist/src/xftglyphs.c	Sun Jan  8 06:03:45 2023
@@ -847,11 +847,11 @@ XftFontLoadGlyphs (Display	    *dpy,
 		if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT)
 		{
 		    xftg->metrics.xOff = 0;
-		    xftg->metrics.yOff = (short)(-font->public.max_advance_width);
+		    xftg->metrics.yOff = (short)(-TRUNC(ROUND(glyphslot->advance.y)));
 		}
 		else
 		{
-		    xftg->metrics.xOff = (short)(font->public.max_advance_width);
+		    xftg->metrics.xOff = (short)(TRUNC(ROUND(glyphslot->advance.x)));
 		    xftg->metrics.yOff = 0;
 		}
 	    }

Index: xsrc/external/mit/libXpm/dist/src/create.c
diff -u xsrc/external/mit/libXpm/dist/src/create.c:1.3 xsrc/external/mit/libXpm/dist/src/create.c:1.4
--- xsrc/external/mit/libXpm/dist/src/create.c:1.3	Sat Mar  4 21:48:03 2017
+++ xsrc/external/mit/libXpm/dist/src/create.c	Sun Jan  8 06:03:45 2023
@@ -2231,7 +2231,7 @@ xpmParseDataAndCreate(
 	}
     }
     /*
-     * store found informations in the XpmImage structure
+     * store found information in the XpmImage structure
      */
     image->width = width;
     image->height = height;

Index: xsrc/external/mit/libXrandr/dist/compile
diff -u xsrc/external/mit/libXrandr/dist/compile:1.4 xsrc/external/mit/libXrandr/dist/compile:1.5
--- xsrc/external/mit/libXrandr/dist/compile:1.4	Mon Mar 18 02:33:03 2019
+++ xsrc/external/mit/libXrandr/dist/compile	Sun Jan  8 06:03:45 2023
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2021 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
 	  MINGW*)
 	    file_conv=mingw
 	    ;;
-	  CYGWIN*)
+	  CYGWIN* | MSYS*)
 	    file_conv=cygwin
 	    ;;
 	  *)
@@ -67,7 +67,7 @@ func_file_conv ()
 	mingw/*)
 	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
 	  ;;
-	cygwin/*)
+	cygwin/* | msys/*)
 	  file=`cygpath -m "$file" || echo "$file"`
 	  ;;
 	wine/*)
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -339,9 +340,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:

Index: xsrc/external/mit/libXrandr/dist/src/XrrProvider.c
diff -u xsrc/external/mit/libXrandr/dist/src/XrrProvider.c:1.9 xsrc/external/mit/libXrandr/dist/src/XrrProvider.c:1.10
--- xsrc/external/mit/libXrandr/dist/src/XrrProvider.c:1.9	Mon Oct 10 02:52:02 2016
+++ xsrc/external/mit/libXrandr/dist/src/XrrProvider.c	Sun Jan  8 06:03:45 2023
@@ -67,7 +67,7 @@ XRRGetProviderResources(Display *dpy, Wi
 
 	rbytes = (sizeof(XRRProviderResources) + rep.nProviders *
 		  sizeof(RRProvider));
-	xrpr = (XRRProviderResources *) Xmalloc(rbytes);
+	xrpr = Xmalloc(rbytes);
     } else {
 	nbytes = 0;
 	nbytesRead = 0;
@@ -104,8 +104,6 @@ XRRFreeProviderResources(XRRProviderReso
     free(provider_resources);
 }
 
-#define ProviderInfoExtra	(SIZEOF(xRRGetProviderInfoReply) - 32)
-#define ProviderInfoExtraWords	(ProviderInfoExtra >> 2)
 XRRProviderInfo *
 XRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provider)
 {
@@ -124,7 +122,7 @@ XRRGetProviderInfo(Display *dpy, XRRScre
     req->provider = provider;
     req->configTimestamp = resources->configTimestamp;
 
-    if (!_XReply (dpy, (xReply *) &rep, ProviderInfoExtraWords, xFalse))
+    if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
     {
 	UnlockDisplay (dpy);
 	SyncHandle ();
@@ -132,23 +130,14 @@ XRRGetProviderInfo(Display *dpy, XRRScre
     }
 
     if (rep.length > (INT_MAX >> 2)
-#if ProviderInfoExtraWords > 0
-	|| rep.length < ProviderInfoExtraWords
-#endif
-    )
     {
-#if ProviderInfoExtraWords > 0
-	if (rep.length < ProviderInfoExtraWords)
-	    _XEatDataWords (dpy, rep.length);
-	else
-#endif
-	    _XEatDataWords (dpy, rep.length - ProviderInfoExtraWords);
+	_XEatDataWords (dpy, rep.length);
 	UnlockDisplay (dpy);
 	SyncHandle ();
 	return NULL;
     }
 
-    nbytes = ((long) rep.length << 2) - ProviderInfoExtra;
+    nbytes = ((long) rep.length << 2);
 
     nbytesRead = (long)(rep.nCrtcs * 4 +
 			rep.nOutputs * 4 +
@@ -161,9 +150,9 @@ XRRGetProviderInfo(Display *dpy, XRRScre
 	      rep.nAssociatedProviders * (sizeof(RRProvider) + sizeof(unsigned int))+
 	      rep.nameLength + 1);
 
-    xpi = (XRRProviderInfo *)Xmalloc(rbytes);
+    xpi = Xmalloc(rbytes);
     if (xpi == NULL) {
-	_XEatDataWords (dpy, rep.length - (ProviderInfoExtra >> 2));
+	_XEatDataWords (dpy, rep.length);
 	UnlockDisplay (dpy);
 	SyncHandle ();
 	return NULL;

Reply via email to