Module Name: xsrc Committed By: mrg Date: Sun Mar 5 01:07:05 UTC 2017
Modified Files: xsrc/external/mit/libXfont/dist/src/FreeType: ftfuncs.c xsrc/external/mit/libXfont/dist/src/bitmap: bdfread.c pcfread.c xsrc/external/mit/libXfont/dist/src/fc: fserve.c xsrc/external/mit/libXfont/include: config.h Log Message: merge libXfont 1.5.2. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c cvs rdiff -u -r1.4 -r1.5 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/libXfont/dist/src/fc/fserve.c cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/libXfont/include/config.h 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/libXfont/dist/src/FreeType/ftfuncs.c diff -u xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c:1.6 xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c:1.7 --- xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c:1.6 Wed Feb 25 19:59:36 2015 +++ xsrc/external/mit/libXfont/dist/src/FreeType/ftfuncs.c Sun Mar 5 01:07:05 2017 @@ -474,7 +474,7 @@ FreeTypeOpenInstance(FTInstancePtr *inst 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 @@ FreeTypeInstanceFindGlyph(unsigned idx_i 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 @@ FreeTypeRasteriseGlyph(unsigned idx, int } 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 @@ restrict_code_range_by_str(int count,uns long val; /* skip comma and/or space */ - while (',' == *p || isspace(*p)) + while (',' == *p || isspace((unsigned char)*p)) p++; /* begin point */ @@ -2079,7 +2079,7 @@ restrict_code_range_by_str(int count,uns } /* skip space */ - while (isspace(*p)) + while (isspace((unsigned char)*p)) p++; if (',' != *p && '\0' != *p) { @@ -2092,7 +2092,7 @@ restrict_code_range_by_str(int count,uns break; /* skip space */ - while (isspace(*p)) + while (isspace((unsigned char)*p)) p++; val = strtol(p, (char **)&q, 0); @@ -2985,13 +2985,13 @@ ft_compute_bounds(FTFontPtr font, FontIn 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 Index: xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.4 xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.5 --- xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c:1.4 Tue Mar 17 18:11:17 2015 +++ xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c Sun Mar 5 01:07:05 2017 @@ -298,7 +298,7 @@ bdfReadCharacters(FontFilePtr file, Font 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 @@ bdfReadCharacters(FontFilePtr file, Font 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 @@ bdfReadProperties(FontFilePtr file, Font } 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); } Index: xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c diff -u xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.3 xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.4 --- xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c:1.3 Fri May 31 01:18:45 2013 +++ xsrc/external/mit/libXfont/dist/src/bitmap/pcfread.c Sun Mar 5 01:07:05 2017 @@ -487,7 +487,6 @@ pcfReadFont(FontPtr pFont, FontFilePtr f 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)]; Index: xsrc/external/mit/libXfont/dist/src/fc/fserve.c diff -u xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.5 xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.6 --- xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.5 Mon Feb 20 14:55:47 2017 +++ xsrc/external/mit/libXfont/dist/src/fc/fserve.c Sun Mar 5 01:07:05 2017 @@ -631,8 +631,8 @@ fs_get_reply (FSFpePtr conn, int *error) */ 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 @@ _fs_client_access (FSFpePtr conn, pointe 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); Index: xsrc/external/mit/libXfont/include/config.h diff -u xsrc/external/mit/libXfont/include/config.h:1.7 xsrc/external/mit/libXfont/include/config.h:1.8 --- xsrc/external/mit/libXfont/include/config.h:1.7 Tue Mar 17 18:36:41 2015 +++ xsrc/external/mit/libXfont/include/config.h Sun Mar 5 01:07:05 2017 @@ -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