Sun Mar 5 01:07:05 2017 UTC ()
merge libXfont 1.5.2.


(mrg)
diff -r1.6 -r1.7 xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c
diff -r1.4 -r1.5 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c
diff -r1.3 -r1.4 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c
diff -r1.5 -r1.6 xsrc/external/mit/libXfont/dist/src/fc/fserve.c
diff -r1.7 -r1.8 xsrc/external/mit/libXfont/include/config.h

cvs diff -r1.6 -r1.7 xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c (expand / switch to context diff)
--- xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c 2015/02/25 19:59:36 1.6
+++ xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c 2017/03/05 01:07:05 1.7
@@ -474,7 +474,7 @@
     if( FT_IS_SFNT( face->face ) ) {
 #if 1
         FT_F26Dot6  tt_char_width, tt_char_height, tt_dim_x, tt_dim_y;
-        FT_UInt     nn;
+        FT_Int     nn;
 
         instance->strike_index=0xFFFFU;
 
@@ -622,7 +622,7 @@
     offset = idx - segment * FONTSEGMENTSIZE;
 
     if((*available)[segment] == NULL) {
-        (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int *));
+        (*available)[segment] = calloc(FONTSEGMENTSIZE, sizeof(int));
         if((*available)[segment] == NULL)
             return AllocError;
     }
@@ -1454,7 +1454,7 @@
 	}
 	for( i = MAX(0, dy) ; i<ht ; i++ ){
 	    int prev_jj,jj;
-	    if( bitmap->rows <= i-dy ) break;
+	    if( bitmap->rows <= (unsigned) (i-dy) ) break;
 	    current_buffer=(unsigned char *)(bitmap->buffer+bitmap->pitch*(i-dy));
 	    current_raster=(unsigned char *)(raster+i*bpr);
 	    j       = MAX(0,div_dx);
@@ -2061,7 +2061,7 @@
         long val;
 
         /* skip comma and/or space */
-        while (',' == *p || isspace(*p))
+        while (',' == *p || isspace((unsigned char)*p))
             p++;
 
         /* begin point */
@@ -2079,7 +2079,7 @@
         }
 
         /* skip space */
-        while (isspace(*p))
+        while (isspace((unsigned char)*p))
             p++;
 
         if (',' != *p && '\0' != *p) {
@@ -2092,7 +2092,7 @@
                 break;
 
             /* skip space */
-            while (isspace(*p))
+            while (isspace((unsigned char)*p))
                 p++;
 
             val = strtol(p, (char **)&q, 0);
@@ -2985,13 +2985,13 @@
           c = row<<8|col;
           flags=0;
           if ( !force_c_outside ) {
-              if ( c <= instance->ttcap.forceConstantSpacingEnd
-		   && instance->ttcap.forceConstantSpacingBegin <= c )
+	      if ( (signed) c <= instance->ttcap.forceConstantSpacingEnd
+		   && instance->ttcap.forceConstantSpacingBegin <= (signed) c )
                   flags|=FT_FORCE_CONSTANT_SPACING;
           }
           else {        /* for GB18030 proportional */
-              if ( c <= instance->ttcap.forceConstantSpacingEnd
-		   || instance->ttcap.forceConstantSpacingBegin <= c )
+              if ( (signed) c <= instance->ttcap.forceConstantSpacingEnd
+		   || instance->ttcap.forceConstantSpacingBegin <= (signed) c )
                   flags|=FT_FORCE_CONSTANT_SPACING;
           }
 #if 0

cvs diff -r1.4 -r1.5 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c (expand / switch to context diff)
--- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c 2015/03/17 18:11:17 1.4
+++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c 2017/03/05 01:07:05 1.5
@@ -298,7 +298,7 @@
 	bdfError("invalid number of CHARS in BDF file\n");
 	return (FALSE);
     }
-    if (nchars > INT32_MAX / sizeof(CharInfoRec)) {
+    if (nchars > (signed) (INT32_MAX / sizeof(CharInfoRec))) {
 	bdfError("Couldn't allocate pCI (%d*%d)\n", nchars,
 		 (int) sizeof(CharInfoRec));
 	goto BAILOUT;
@@ -426,7 +426,7 @@
 	    goto BAILOUT;
 	}
 	/* xCharInfo metrics are stored as INT16 */
-	if ((wx < 0) || (wx > INT16_MAX)) {
+	if ((wx < INT16_MIN) || (wx > INT16_MAX)) {
 	    bdfError("character '%s' has out of range width, %d\n",
 		     charName, wx);
 	    goto BAILOUT;
@@ -631,7 +631,7 @@
     }
     if ((sscanf((char *) line, "STARTPROPERTIES %d", &nProps) != 1) ||
 	(nProps <= 0) ||
-	(nProps > ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) {
+	(nProps > (signed) ((INT32_MAX / sizeof(FontPropRec)) - BDF_GENPROPS))) {
 	bdfError("bad 'STARTPROPERTIES'\n");
 	return (FALSE);
     }

cvs diff -r1.3 -r1.4 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c (expand / switch to context diff)
--- xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c 2013/05/31 01:18:45 1.3
+++ xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c 2017/03/05 01:07:05 1.4
@@ -487,7 +487,6 @@
     for (i = 0; i < GLYPHPADOPTIONS; i++) {
 	bitmapSizes[i] = pcfGetINT32(file, format);
 	if (IS_EOF(file)) goto Bail;
-	if (bitmapSizes[i] < 0) goto Bail;
     }
 
     sizebitmaps = bitmapSizes[PCF_GLYPH_PAD_INDEX(format)];

cvs diff -r1.5 -r1.6 xsrc/external/mit/libXfont/dist/src/fc/fserve.c (expand / switch to context diff)
--- xsrc/external/mit/libXfont/dist/src/fc/fserve.c 2017/02/20 14:55:47 1.5
+++ xsrc/external/mit/libXfont/dist/src/fc/fserve.c 2017/03/05 01:07:05 1.6
@@ -631,8 +631,8 @@
      */
     if (rep->length > MAX_REPLY_LENGTH)
     {
-	ErrorF("fserve: reply length %d > MAX_REPLY_LENGTH, disconnecting"
-	       " from font server\n", rep->length);
+	ErrorF("fserve: reply length %ld > MAX_REPLY_LENGTH, disconnecting"
+	       " from font server\n", (long)rep->length);
 	_fs_connection_died (conn);
 	*error = FSIO_ERROR;
 	return 0;
@@ -2850,14 +2850,12 @@
 	if (crac.num_auths == 0) {
 	    authorizations = padding;
 	    authlen = 4;
-	} else {
-	    authlen = (authlen + 3) & ~0x3;
 	}
 	crac.length = (sizeof (fsCreateACReq) + authlen) >> 2;
 	crac.acid = cur->acid;
 	_fs_add_req_log(conn, FS_CreateAC);
 	_fs_write(conn, (char *) &crac, sizeof (fsCreateACReq));
-	_fs_write(conn, authorizations, authlen);
+	_fs_write_pad(conn, authorizations, authlen);
 	/* ignore reply; we don't even care about it */
 	conn->curacid = 0;
 	cur->auth_generation = client_auth_generation(client);

cvs diff -r1.7 -r1.8 xsrc/external/mit/libXfont/include/config.h (expand / switch to context diff)
--- xsrc/external/mit/libXfont/include/config.h 2015/03/17 18:36:41 1.7
+++ xsrc/external/mit/libXfont/include/config.h 2017/03/05 01:07:05 1.8
@@ -75,7 +75,7 @@
 #define PACKAGE_NAME "libXfont"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libXfont 1.5.1"
+#define PACKAGE_STRING "libXfont 1.5.2"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "libXfont"
@@ -84,7 +84,7 @@
 #undef PACKAGE_URL
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "1.5.1"
+#define PACKAGE_VERSION "1.5.2"
 
 /* Major version of this package */
 #define PACKAGE_VERSION_MAJOR 1
@@ -93,7 +93,7 @@
 #define PACKAGE_VERSION_MINOR 5
 
 /* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 1
+#define PACKAGE_VERSION_PATCHLEVEL 2
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -127,7 +127,7 @@
 
 
 /* Version number of package */
-#define VERSION "1.5.1"
+#define VERSION "1.5.2"
 
 /* Support bdf format bitmap font files */
 #define XFONT_BDFFORMAT 1