From 2acb86c9b086bdb9a3897db0b93820652e07cb59 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 8 Jun 2014 14:33:00 +0200 Subject: xwininfo libX11 mesa mkfontscale xserver git updated 8 June 2014 xserver commit e27a839bf0488d5b1cc2e2a887f2ea0e3d790790 libxcb commit d978a4f69b30b630f28d07f1003cf290284d24d8 libxcb/xcb-proto commit 389889e2f95af19e7fc7ac89e7faeb2f28652415 xkeyboard-config commit bc3ac1b0d152e929b3532a541596cf9fe286bb9e libX11 commit d81fed46144d089bdfa1d916a28dffc9ebffe1e4 libXdmcp commit fe8eab93e9bcdbe8bb8052434bb5e676e3a0ee8f libXext commit 11aad96bd689d54156064d2e81213dc827a689d1 libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909 libXau commit 1e4635be11154dd8262f37b379511bd627defa2a xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 pixman commit 9cd283b2eb8279824406bfd47b020d21fc00cf82 xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 glproto commit f84853d97d5749308992412a215fa518b6536eb3 mkfontscale commit 48e541dc2f2fc3f4e99d3e168c28241ff5adff4d xwininfo commit 017b3736489985999d8dcf4d9e473e1fd6dd3647 libXft commit 214f9b5306d833e2787c75fe41dfdc9228fcb738 libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63 libxtrans commit a57a7f62242e1ea972b81414741729bf3dbae0a4 fontconfig commit f44bfad235e63bb792c38e16ae1fbd281ec1453b mesa commit eb58aa9cf015e79a0fcf2e088676e6aa1d5dabce --- apps/xwininfo/autogen.sh | 5 +- apps/xwininfo/configure.ac | 3 +- apps/xwininfo/dsimple.h | 2 +- apps/xwininfo/man/xwininfo.man | 8 +- apps/xwininfo/xwininfo.c | 9 +- fontconfig/src/fccache.c | 24 ++- fontconfig/src/fcdir.c | 30 ++- fontconfig/src/fcint.h | 7 +- libX11/modules/im/ximcp/imCallbk.c | 6 +- libX11/modules/im/ximcp/imDefIc.c | 7 +- libX11/modules/im/ximcp/imDefIm.c | 6 +- libX11/modules/im/ximcp/imDefLkup.c | 13 +- libX11/modules/im/ximcp/imInt.c | 9 +- libX11/modules/im/ximcp/imLcIm.c | 102 ++++----- libX11/modules/im/ximcp/imRmAttr.c | 24 +-- libX11/modules/im/ximcp/imThaiIc.c | 18 +- libX11/modules/lc/def/lcDefConv.c | 3 +- libX11/modules/lc/gen/lcGenConv.c | 53 +++-- libX11/modules/om/generic/omGeneric.c | 43 ++-- libX11/src/FetchName.c | 4 +- libX11/src/Font.c | 22 +- libX11/src/FontInfo.c | 4 +- libX11/src/FontNames.c | 4 +- libX11/src/GetFPath.c | 4 +- libX11/src/GetHints.c | 16 +- libX11/src/GetNrmHint.c | 2 +- libX11/src/GetRGBCMap.c | 8 +- libX11/src/GetStCmap.c | 2 +- libX11/src/GetWMCMapW.c | 2 +- libX11/src/ImUtil.c | 4 +- libX11/src/InitExt.c | 2 +- libX11/src/KeyBind.c | 9 +- libX11/src/ListExt.c | 4 +- libX11/src/ModMap.c | 5 +- libX11/src/OpenDis.c | 34 ++- libX11/src/PutImage.c | 11 +- libX11/src/RdBitF.c | 2 +- libX11/src/ScrResStr.c | 3 +- libX11/src/StBytes.c | 2 +- libX11/src/XlibInt.c | 12 +- libX11/src/xkb/XKBNames.c | 9 +- libX11/src/xlibi18n/lcUTF8.c | 4 +- libXdmcp/autogen.sh | 4 +- libXdmcp/configure.ac | 1 - libXft/NEWS | 8 + libXft/configure.ac | 2 +- mesalib/configure.ac | 44 ++-- mesalib/docs/GL3.txt | 8 +- mesalib/docs/index.html | 14 ++ mesalib/docs/llvmpipe.html | 52 +++-- mesalib/docs/relnotes.html | 2 + mesalib/docs/relnotes/10.2.1.html | 61 ++++++ mesalib/docs/relnotes/10.2.html | 6 +- mesalib/docs/relnotes/10.3.html | 1 + mesalib/scons/crossmingw.py | 17 +- mesalib/src/gallium/auxiliary/util/u_debug.c | 32 +++ mesalib/src/gallium/auxiliary/util/u_debug.h | 9 + mesalib/src/gallium/auxiliary/util/u_math.h | 2 +- mesalib/src/gallium/auxiliary/util/u_video.h | 4 + mesalib/src/glsl/Makefile.am | 1 + mesalib/src/glsl/SConscript | 2 +- mesalib/src/glsl/ast.h | 11 +- mesalib/src/glsl/ast_function.cpp | 6 +- mesalib/src/glsl/ast_to_hir.cpp | 114 +++++++--- mesalib/src/glsl/glsl_lexer.ll | 3 + mesalib/src/glsl/glsl_parser.yy | 69 +++++-- mesalib/src/glsl/glsl_parser_extras.cpp | 5 +- mesalib/src/glsl/glsl_types.cpp | 22 +- mesalib/src/glsl/glsl_types.h | 3 +- mesalib/src/glsl/ir.cpp | 65 +++--- mesalib/src/glsl/ir.h | 230 ++++++++------------- mesalib/src/glsl/ir_function.cpp | 199 ++++++++++++++++-- mesalib/src/glsl/ir_validate.cpp | 2 +- mesalib/src/glsl/loop_analysis.cpp | 6 +- mesalib/src/loader/loader.c | 172 +++++++++++++-- mesalib/src/mapi/glapi/gen/gl_API.xml | 3 + mesalib/src/mapi/glapi/glapi_dispatch.c | 57 +++++ mesalib/src/mesa/drivers/common/meta_blit.c | 3 + mesalib/src/mesa/main/get.c | 16 +- mesalib/src/mesa/main/get_hash_generator.py | 2 +- mesalib/src/mesa/main/get_hash_params.py | 4 +- mesalib/src/mesa/main/hash.c | 10 + mesalib/src/mesa/main/performance_monitor.c | 5 + mesalib/src/mesa/program/prog_hash_table.c | 8 + mesalib/src/mesa/state_tracker/st_atom_texture.c | 11 +- mkfontscale/autogen.sh | 5 +- mkfontscale/configure.ac | 1 - xorg-server/Xi/exevents.c | 4 + xorg-server/config/10-quirks.conf | 16 -- xorg-server/configure.ac | 8 +- xorg-server/dix/devices.c | 7 +- xorg-server/dix/events.c | 2 +- xorg-server/fb/fbscreen.c | 2 +- xorg-server/hw/xfree86/common/compiler.h | 5 +- xorg-server/hw/xfree86/common/xf86Config.c | 2 +- xorg-server/hw/xfree86/loader/loadmod.c | 6 + .../hw/xfree86/os-support/linux/lnx_video.c | 3 +- xorg-server/hw/xfree86/xorgconf.cpp | 2 +- xorg-server/hw/xquartz/bundle/Info.plist.cpp | 4 +- xorg-server/hw/xquartz/darwin.c | 16 -- xorg-server/hw/xquartz/xpr/xprScreen.c | 16 +- xorg-server/hw/xwin/glx/indirect.c | 13 +- xorg-server/include/misc.h | 18 +- xorg-server/include/servermd.h | 14 ++ xorg-server/include/xwin-config.h.in | 3 + xorg-server/man/Xserver.man | 5 +- xorg-server/mi/mieq.c | 4 + xorg-server/os/log.c | 65 +++--- xorg-server/present/present.c | 126 +++++++---- xorg-server/present/present_priv.h | 1 + xorg-server/test/input.c | 14 +- xorg-server/xfixes/cursor.c | 2 + 112 files changed, 1456 insertions(+), 745 deletions(-) create mode 100644 mesalib/docs/relnotes/10.2.1.html diff --git a/apps/xwininfo/autogen.sh b/apps/xwininfo/autogen.sh index e81f98910..fc34bd55c 100644 --- a/apps/xwininfo/autogen.sh +++ b/apps/xwininfo/autogen.sh @@ -9,5 +9,6 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode "$@" - +if test -z "$NOCONFIGURE"; then + $srcdir/configure "$@" +fi diff --git a/apps/xwininfo/configure.ac b/apps/xwininfo/configure.ac index b28dd894a..3149a5fe6 100644 --- a/apps/xwininfo/configure.ac +++ b/apps/xwininfo/configure.ac @@ -31,7 +31,6 @@ AC_USE_SYSTEM_EXTENSIONS # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE AM_ICONV # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS @@ -67,7 +66,7 @@ PKG_CHECK_MODULES(XWININFO, [xcb >= 1.6] xcb-shape ${xcb_icccm_pc}) # Even when using xcb, xproto is still required for Xfuncproto.h # and libX11 headers for cursorfont.h -PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.17]) +PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.25]) XWININFO_CFLAGS="${XWININFO_CFLAGS} ${XLIB_CFLAGS}" XWININFO_LIBS="${XWININFO_LIBS} ${LIBICONV}" diff --git a/apps/xwininfo/dsimple.h b/apps/xwininfo/dsimple.h index 952960542..6699e7634 100644 --- a/apps/xwininfo/dsimple.h +++ b/apps/xwininfo/dsimple.h @@ -54,7 +54,7 @@ void Setup_Display_And_Screen (const char *displayname, xcb_window_t Select_Window (xcb_connection_t *, const xcb_screen_t *, int); xcb_window_t Window_With_Name (xcb_connection_t *, xcb_window_t, const char *); -void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2); +void Fatal_Error (const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2) _X_COLD; void Print_X_Error (xcb_connection_t *, xcb_generic_error_t *); diff --git a/apps/xwininfo/man/xwininfo.man b/apps/xwininfo/man/xwininfo.man index 6da713943..66418c6dd 100644 --- a/apps/xwininfo/man/xwininfo.man +++ b/apps/xwininfo/man/xwininfo.man @@ -32,7 +32,7 @@ xwininfo \- window information utility for X [\-children] [\-tree] [\-stats] [\-bits] [\-events] [\-size] [\-wm] [\-shape] [\-frame] [\-all] [\-english] [\-metric] -[\-display \fIdisplay\fP] +[\-display \fIdisplay\fP] [\-version] .SH DESCRIPTION .PP .I Xwininfo @@ -154,6 +154,12 @@ This option is a quick way to ask for all information possible. .TP 8 .B \-display \fIdisplay\fP This option allows you to specify the server to connect to; see \fIX(__miscmansuffix__)\fP. +PP +.TP 8 +.B \-version +This option indicates that +.I xwininfo +should print its version information and exit. .SH EXAMPLE .PP The following is a sample summary taken with no options specified: diff --git a/apps/xwininfo/xwininfo.c b/apps/xwininfo/xwininfo.c index 39ae6ea27..520719bdd 100644 --- a/apps/xwininfo/xwininfo.c +++ b/apps/xwininfo/xwininfo.c @@ -278,7 +278,7 @@ static size_t strlcat (char *dst, const char *src, size_t dstsize) /* * Report the syntax for calling xwininfo: */ -_X_NORETURN +_X_NORETURN _X_COLD static void usage (void) { @@ -286,6 +286,7 @@ usage (void) "usage: %s [-options ...]\n\n" "where options include:\n" " -help print this message\n" + " -version print version message\n" " -display host:dpy X server to contact\n" " -root use the root window\n" " -id windowid use the window with the specified id\n" @@ -537,6 +538,12 @@ main (int argc, char **argv) tree = stats = bits = events = wm = size = shape = 1; continue; } + if (!strcmp(argv[i], "-version")) { + puts(PACKAGE_STRING); + exit(0); + } + fprintf (stderr, "%s: unrecognized argument %s\n\n", + program_name, argv[i]); usage (); } diff --git a/fontconfig/src/fccache.c b/fontconfig/src/fccache.c index 5173e0be2..085bd72e3 100644 --- a/fontconfig/src/fccache.c +++ b/fontconfig/src/fccache.c @@ -545,6 +545,26 @@ FcCacheTimeValid (FcCache *cache, struct stat *dir_stat) return cache->checksum == (int) dir_stat->st_mtime; } +static FcBool +FcCacheDirsValid (FcCache *cache) +{ + FcStrSet *dirs = FcStrSetCreate (); + FcBool ret = FcFalse; + + if (!dirs) + goto bail; + if (!FcDirScanOnly (dirs, FcCacheDir (cache))) + goto bail1; + ret = cache->dirs_count == dirs->num; + if (FcDebug () & FC_DBG_CACHE) + printf ("%s: cache: %d, fs: %d\n", FcCacheDir (cache), cache->dirs_count, dirs->num); + +bail1: + FcStrSetDestroy (dirs); +bail: + return ret; +} + /* * Map a cache file into memory */ @@ -559,7 +579,8 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) cache = FcCacheFindByStat (fd_stat); if (cache) { - if (FcCacheTimeValid (cache, dir_stat)) + if (FcCacheTimeValid (cache, dir_stat) && + FcCacheDirsValid (cache)) return cache; FcDirCacheUnload (cache); cache = NULL; @@ -611,6 +632,7 @@ FcDirCacheMapFd (int fd, struct stat *fd_stat, struct stat *dir_stat) cache->version < FC_CACHE_CONTENT_VERSION || cache->size != (intptr_t) fd_stat->st_size || !FcCacheTimeValid (cache, dir_stat) || + !FcCacheDirsValid (cache) || !FcCacheInsert (cache, fd_stat)) { if (allocated) diff --git a/fontconfig/src/fcdir.c b/fontconfig/src/fcdir.c index 3bcd0b867..49259c1f2 100644 --- a/fontconfig/src/fcdir.c +++ b/fontconfig/src/fcdir.c @@ -164,7 +164,8 @@ FcDirScanConfig (FcFontSet *set, FcBlanks *blanks, const FcChar8 *dir, FcBool force, /* XXX unused */ - FcConfig *config) + FcConfig *config, + FcBool scanOnly) { DIR *d; struct dirent *e; @@ -180,7 +181,7 @@ FcDirScanConfig (FcFontSet *set, if (!set && !dirs) return FcTrue; - if (!blanks) + if (!blanks && !scanOnly) blanks = FcConfigGetBlanks (config); /* freed below */ @@ -233,7 +234,17 @@ FcDirScanConfig (FcFontSet *set, * Scan file files to build font patterns */ for (i = 0; i < files->num; i++) - FcFileScanConfig (set, dirs, blanks, files->strs[i], config); + { + if (scanOnly) + { + if (FcFileIsDir (files->strs[i])) + FcStrSetAdd (dirs, files->strs[i]); + } + else + { + FcFileScanConfig (set, dirs, blanks, files->strs[i], config); + } + } bail2: FcStrSetDestroy (files); @@ -257,7 +268,14 @@ FcDirScan (FcFontSet *set, if (cache || !force) return FcFalse; - return FcDirScanConfig (set, dirs, blanks, dir, force, FcConfigGetCurrent ()); + return FcDirScanConfig (set, dirs, blanks, dir, force, FcConfigGetCurrent (), FcFalse); +} + +FcBool +FcDirScanOnly (FcStrSet *dirs, + const FcChar8 *dir) +{ + return FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, NULL, FcTrue); } /* @@ -288,7 +306,7 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config)) + if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config, FcFalse)) goto bail2; /* @@ -330,7 +348,7 @@ FcDirCacheRescan (const FcChar8 *dir, FcConfig *config) /* * Scan the dir */ - if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config)) + if (!FcDirScanConfig (NULL, dirs, NULL, dir, FcTrue, config, FcFalse)) goto bail1; /* * Rebuild the cache object diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h index 3d41b0cb2..a1b147f1d 100644 --- a/fontconfig/src/fcint.h +++ b/fontconfig/src/fcint.h @@ -849,7 +849,12 @@ FcDirScanConfig (FcFontSet *set, FcBlanks *blanks, const FcChar8 *dir, FcBool force, - FcConfig *config); + FcConfig *config, + FcBool scanOnly); + +FcPrivate FcBool +FcDirScanOnly (FcStrSet *dirs, + const FcChar8 *dir); /* fcfont.c */ FcPrivate int diff --git a/libX11/modules/im/ximcp/imCallbk.c b/libX11/modules/im/ximcp/imCallbk.c index 07921f8a1..4e091d8ef 100644 --- a/libX11/modules/im/ximcp/imCallbk.c +++ b/libX11/modules/im/ximcp/imCallbk.c @@ -553,10 +553,8 @@ static void _free_memory_for_text(XIMText* text) { if (text) { - if (text->string.multi_byte) - Xfree(text->string.multi_byte); - if (text->feedback) - Xfree(text->feedback); + Xfree(text->string.multi_byte); + Xfree(text->feedback); Xfree(text); } } diff --git a/libX11/modules/im/ximcp/imDefIc.c b/libX11/modules/im/ximcp/imDefIc.c index 9610a0f11..143bd5942 100644 --- a/libX11/modules/im/ximcp/imDefIc.c +++ b/libX11/modules/im/ximcp/imDefIc.c @@ -1595,10 +1595,9 @@ _XimProtoCreateIC( ErrorOnCreatingIC: _XimUnregisterFilter(ic); - if (ic->private.proto.ic_resources) - Xfree(ic->private.proto.ic_resources); - if (ic->private.proto.ic_inner_resources) - Xfree(ic->private.proto.ic_inner_resources); + + Xfree(ic->private.proto.ic_resources); + Xfree(ic->private.proto.ic_inner_resources); Xfree(ic); return (XIC)NULL; } diff --git a/libX11/modules/im/ximcp/imDefIm.c b/libX11/modules/im/ximcp/imDefIm.c index 9168135e1..9e877c0b4 100644 --- a/libX11/modules/im/ximcp/imDefIm.c +++ b/libX11/modules/im/ximcp/imDefIm.c @@ -1775,10 +1775,8 @@ _XimEncodingNegotiation( detail_ptr, detail_len))) goto free_preply; - if (name_ptr) - Xfree(name_ptr); - if (detail_ptr) - Xfree(detail_ptr); + Xfree(name_ptr); + Xfree(detail_ptr); if(reply != preply) Xfree(preply); diff --git a/libX11/modules/im/ximcp/imDefLkup.c b/libX11/modules/im/ximcp/imDefLkup.c index e88123493..dea7f66d5 100644 --- a/libX11/modules/im/ximcp/imDefLkup.c +++ b/libX11/modules/im/ximcp/imDefLkup.c @@ -599,10 +599,9 @@ _XimUnregCommitInfo( if (!(info = ic->private.proto.commit_info)) return; - if (info->string) - Xfree(info->string); - if (info->keysym) - Xfree(info->keysym); + + Xfree(info->string); + Xfree(info->keysym); ic->private.proto.commit_info = info->next; Xfree(info); return; @@ -696,10 +695,8 @@ _XimCommitRecv( } if (!(_XimRegCommitInfo(ic, string, string_len, keysym, keysym_len))) { - if (string) - Xfree(string); - if (keysym) - Xfree(keysym); + Xfree(string); + Xfree(keysym); _XimError(im, ic, XIM_BadAlloc, (INT16)0, (CARD16)0, (char *)NULL); return False; } diff --git a/libX11/modules/im/ximcp/imInt.c b/libX11/modules/im/ximcp/imInt.c index ee9f45122..bb393e0e4 100644 --- a/libX11/modules/im/ximcp/imInt.c +++ b/libX11/modules/im/ximcp/imInt.c @@ -239,14 +239,11 @@ Error4 : Xfree(im); return NULL; Error3 : - if(im->core.im_name) - Xfree(im->core.im_name); + Xfree(im->core.im_name); Error2: - if(im->core.res_class) - Xfree(im->core.res_class); + Xfree(im->core.res_class); Error1: - if(im->core.res_name) - Xfree(im->core.res_name); + Xfree(im->core.res_name); Xfree(im); return NULL; } diff --git a/libX11/modules/im/ximcp/imLcIm.c b/libX11/modules/im/ximcp/imLcIm.c index 3ab2dfc16..f3678868c 100644 --- a/libX11/modules/im/ximcp/imLcIm.c +++ b/libX11/modules/im/ximcp/imLcIm.c @@ -131,13 +131,14 @@ XimFreeDefaultTree( } #endif Xfree (b->tree); - if (b->mb) Xfree (b->mb); - if (b->wc) Xfree (b->wc); - if (b->utf8) Xfree (b->utf8); b->tree = NULL; + Xfree (b->mb); b->mb = NULL; + Xfree (b->wc); b->wc = NULL; + Xfree (b->utf8); b->utf8 = NULL; + b->treeused = b->treesize = 0; b->mbused = b->mbsize = 0; b->wcused = b->wcsize = 0; @@ -151,38 +152,30 @@ _XimLocalIMFree( XimFreeDefaultTree(&im->private.local.base); im->private.local.top = 0; - if(im->core.im_resources) { - Xfree(im->core.im_resources); - im->core.im_resources = NULL; - } - if(im->core.ic_resources) { - Xfree(im->core.ic_resources); - im->core.ic_resources = NULL; - } - if(im->core.im_values_list) { - Xfree(im->core.im_values_list); - im->core.im_values_list = NULL; - } - if(im->core.ic_values_list) { - Xfree(im->core.ic_values_list); - im->core.ic_values_list = NULL; - } - if(im->core.styles) { - Xfree(im->core.styles); - im->core.styles = NULL; - } - if(im->core.res_name) { - Xfree(im->core.res_name); - im->core.res_name = NULL; - } - if(im->core.res_class) { - Xfree(im->core.res_class); - im->core.res_class = NULL; - } - if(im->core.im_name) { - Xfree(im->core.im_name); - im->core.im_name = NULL; - } + Xfree(im->core.im_resources); + im->core.im_resources = NULL; + + Xfree(im->core.ic_resources); + im->core.ic_resources = NULL; + + Xfree(im->core.im_values_list); + im->core.im_values_list = NULL; + + Xfree(im->core.ic_values_list); + im->core.ic_values_list = NULL; + + Xfree(im->core.styles); + im->core.styles = NULL; + + Xfree(im->core.res_name); + im->core.res_name = NULL; + + Xfree(im->core.res_class); + im->core.res_class = NULL; + + Xfree(im->core.im_name); + im->core.im_name = NULL; + if (im->private.local.ctom_conv) { _XlcCloseConverter(im->private.local.ctom_conv); im->private.local.ctom_conv = NULL; @@ -576,19 +569,15 @@ _XimCreateDefaultTree( encoding, 0, 1, &cachename, &size); if (cachefd != -1) { if (_XimLoadCache (cachefd, intname, encoding, size, im)) { - if (tmpcachedir) - Xfree (tmpcachedir); - if (tmpname) - Xfree (tmpname); - if (cachename) - Xfree (cachename); + Xfree (tmpcachedir); + Xfree (tmpname); + Xfree (cachename); close (cachefd); return; } close (cachefd); } - if (cachename) - Xfree (cachename); + Xfree (cachename); cachename = NULL; } @@ -603,12 +592,9 @@ _XimCreateDefaultTree( euid, 0, &cachename, &size); if (cachefd != -1) { if (_XimLoadCache (cachefd, intname, encoding, size, im)) { - if (tmpcachedir) - Xfree (tmpcachedir); - if (tmpname) - Xfree (tmpname); - if (cachename) - Xfree (cachename); + Xfree (tmpcachedir); + Xfree (tmpname); + Xfree (cachename); close (cachefd); return; } @@ -618,12 +604,9 @@ _XimCreateDefaultTree( #endif if (! (fp = _XFopenFile (name, "r"))) { - if (tmpcachedir) - Xfree (tmpcachedir); - if (tmpname) - Xfree (tmpname); - if (cachename) - Xfree (cachename); + Xfree (tmpcachedir); + Xfree (tmpname); + Xfree (cachename); return; } _XimParseStringFile(fp, im); @@ -636,12 +619,9 @@ _XimCreateDefaultTree( } #endif - if (tmpcachedir) - Xfree (tmpcachedir); - if (tmpname) - Xfree (tmpname); - if (cachename) - Xfree (cachename); + Xfree (tmpcachedir); + Xfree (tmpname); + Xfree (cachename); } static XIMMethodsRec Xim_im_local_methods = { diff --git a/libX11/modules/im/ximcp/imRmAttr.c b/libX11/modules/im/ximcp/imRmAttr.c index ad5290ee5..9d4e46258 100644 --- a/libX11/modules/im/ximcp/imRmAttr.c +++ b/libX11/modules/im/ximcp/imRmAttr.c @@ -972,8 +972,7 @@ _XimEncodePreeditValue( if (!p->value) return False; - if (ic->private.proto.preedit_font) - Xfree(ic->private.proto.preedit_font); + Xfree(ic->private.proto.preedit_font); list_ret = XFontsOfFontSet((XFontSet)p->value, &struct_list, &name_list); @@ -1024,8 +1023,7 @@ _XimEncodeStatusValue( if (!p->value) return False; - if (ic->private.proto.status_font) - Xfree(ic->private.proto.status_font); + Xfree(ic->private.proto.status_font); list_ret = XFontsOfFontSet((XFontSet)p->value, &struct_list, &name_list); @@ -1243,8 +1241,7 @@ _XimEncodeSavedStatusValue( if (!value) return False; - if (ic->private.proto.status_font) - Xfree(ic->private.proto.status_font); + Xfree(ic->private.proto.status_font); list_ret = XFontsOfFontSet((XFontSet)value, &struct_list, &name_list); @@ -1460,10 +1457,9 @@ _XimGetAttributeID( } _XIMCompileResourceList(res, n); - if (im->core.im_resources) - Xfree(im->core.im_resources); - if (im->core.im_values_list) - Xfree(im->core.im_values_list); + Xfree(im->core.im_resources); + Xfree(im->core.im_values_list); + im->core.im_resources = res; im->core.im_num_resources = n; im->core.im_values_list = values_list; @@ -1506,10 +1502,10 @@ _XimGetAttributeID( } _XIMCompileResourceList(res, n); - if (im->core.ic_resources) - Xfree(im->core.ic_resources); - if (im->core.ic_values_list) - Xfree(im->core.ic_values_list); + + Xfree(im->core.ic_resources); + Xfree(im->core.ic_values_list); + im->core.ic_resources = res; im->core.ic_num_resources = n; im->core.ic_values_list = values_list; diff --git a/libX11/modules/im/ximcp/imThaiIc.c b/libX11/modules/im/ximcp/imThaiIc.c index 90da143f6..313734072 100644 --- a/libX11/modules/im/ximcp/imThaiIc.c +++ b/libX11/modules/im/ximcp/imThaiIc.c @@ -65,18 +65,20 @@ _XimThaiDestroyIC( if(((Xim)ic->core.im)->private.local.current_ic == (XIC)ic) { _XimThaiUnSetFocus(xic); } - if(ic->private.local.ic_resources) { - Xfree(ic->private.local.ic_resources); - ic->private.local.ic_resources = NULL; - } - if (b->tree) Xfree (b->tree); - if (b->mb) Xfree (b->mb); - if (b->wc) Xfree (b->wc); - if (b->utf8) Xfree (b->utf8); + Xfree(ic->private.local.ic_resources); + ic->private.local.ic_resources = NULL; + + Xfree (b->tree); b->tree = NULL; + + Xfree (b->mb); b->mb = NULL; + + Xfree (b->wc); b->wc = NULL; + + Xfree (b->utf8); b->utf8 = NULL; return; } diff --git a/libX11/modules/lc/def/lcDefConv.c b/libX11/modules/lc/def/lcDefConv.c index 3cd5c22c9..e1f02289b 100644 --- a/libX11/modules/lc/def/lcDefConv.c +++ b/libX11/modules/lc/def/lcDefConv.c @@ -563,9 +563,8 @@ static void close_converter( XlcConv conv) { - if (conv->state) - Xfree(conv->state); + Xfree(conv->state); Xfree(conv); } diff --git a/libX11/modules/lc/gen/lcGenConv.c b/libX11/modules/lc/gen/lcGenConv.c index 1f7c301f5..eede76807 100644 --- a/libX11/modules/lc/gen/lcGenConv.c +++ b/libX11/modules/lc/gen/lcGenConv.c @@ -753,7 +753,7 @@ mbstowcs_org( CodeSet codeset = NULL; - const char *inbufptr = *from; + const char *inbufptr; wchar_t *outbufptr = (wchar_t *) *to; int from_size = *from_left; @@ -764,6 +764,8 @@ mbstowcs_org( return( 0 ); } + inbufptr = *from; + while (*from_left && *to_left) { ch = *inbufptr++; @@ -1223,8 +1225,7 @@ stdc_wcstocts( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1252,7 +1253,7 @@ ctstowcs( CodeSet codeset = NULL; XlcCharSet charset_tmp; - const char *inbufptr = *from; + const char *inbufptr; wchar_t *outbufptr = (wchar_t *) *to; int from_size = *from_left; @@ -1262,6 +1263,7 @@ ctstowcs( _XlcResetConverter(conv); return( 0 ); } + inbufptr = *from; while (*from_left && *to_left) { @@ -1437,7 +1439,7 @@ cstowcs( CodeSet codeset = NULL; XlcCharSet charset, charset_tmp; - const char *inbufptr = *from; + const char *inbufptr; wchar_t *outbufptr = (wchar_t *) *to; int from_size = *from_left; @@ -1445,6 +1447,8 @@ cstowcs( return( 0 ); } + inbufptr = *from; + charset = (XlcCharSet) args[0]; while (*from_left && *to_left) { @@ -1543,8 +1547,7 @@ stdc_ctstowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1579,8 +1582,7 @@ stdc_cstowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1615,8 +1617,7 @@ mbstocts( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -1643,7 +1644,7 @@ mbstostr( CodeSet codeset = NULL; - const char *inbufptr = *from; + const char *inbufptr; char *outbufptr = *to; int from_size = *from_left; @@ -1654,6 +1655,8 @@ mbstostr( return( 0 ); } + inbufptr = *from; + while (*from_left && *to_left) { ch = *inbufptr++; @@ -1758,7 +1761,7 @@ mbtocs( CodeSet codeset = NULL; XlcCharSet charset = NULL; - const char *inbufptr = *from; + const char *inbufptr; char *outbufptr = *to; int from_size = *from_left; @@ -1769,6 +1772,8 @@ mbtocs( return( 0 ); } + inbufptr = *from; + while (*from_left && *to_left) { ch = *inbufptr++; @@ -2062,8 +2067,7 @@ stdc_wcstostr( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2337,8 +2341,7 @@ ctstombs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2373,8 +2376,7 @@ cstombs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2582,8 +2584,7 @@ stdc_strtowcs( goto ret; ret: - if (buf) - Xfree(buf); + Xfree(buf); return (unconv_num1 + unconv_num2); } @@ -2596,14 +2597,8 @@ static void close_converter( XlcConv conv) { - if (conv->state) { - Xfree(conv->state); - } - - if (conv->methods) { - Xfree(conv->methods); - } - + Xfree(conv->state); + Xfree(conv->methods); Xfree(conv); } diff --git a/libX11/modules/om/generic/omGeneric.c b/libX11/modules/om/generic/omGeneric.c index 0d202c0f6..a835f00d7 100644 --- a/libX11/modules/om/generic/omGeneric.c +++ b/libX11/modules/om/generic/omGeneric.c @@ -196,16 +196,12 @@ init_fontset( return True; err: - if(font_set->font_data) - Xfree(font_set->font_data); - if(font_set->substitute) - Xfree(font_set->substitute); - if(font_set->vmap) - Xfree(font_set->vmap); - if(font_set->vrotate) - Xfree(font_set->vrotate); - if(font_set) - Xfree(font_set); + + Xfree(font_set->font_data); + Xfree(font_set->substitute); + Xfree(font_set->vmap); + Xfree(font_set->vrotate); + Xfree(font_set); gen->font_set = (FontSet) NULL; gen->font_set_num = 0; return False; @@ -504,8 +500,8 @@ init_core_part( return True; err: - if (font_name_list) - Xfree(font_name_list); + + Xfree(font_name_list); Xfree(font_struct_list); return False; @@ -1486,24 +1482,15 @@ destroy_oc( */ /* For VW/UDC end */ - if (oc->core.base_name_list) - Xfree(oc->core.base_name_list); - - if (oc->core.font_info.font_name_list) - XFreeStringList(oc->core.font_info.font_name_list); - - if (oc->core.font_info.font_struct_list) { - Xfree(oc->core.font_info.font_struct_list); - } - - if (oc->core.missing_list.charset_list) - XFreeStringList(oc->core.missing_list.charset_list); + Xfree(oc->core.base_name_list); + XFreeStringList(oc->core.font_info.font_name_list); + Xfree(oc->core.font_info.font_struct_list); + XFreeStringList(oc->core.missing_list.charset_list); #ifdef notdef - if (oc->core.res_name) - Xfree(oc->core.res_name); - if (oc->core.res_class) - Xfree(oc->core.res_class); + + Xfree(oc->core.res_name); + Xfree(oc->core.res_class); #endif Xfree(oc); diff --git a/libX11/src/FetchName.c b/libX11/src/FetchName.c index 8605a6dfc..160eb5bd6 100644 --- a/libX11/src/FetchName.c +++ b/libX11/src/FetchName.c @@ -58,7 +58,7 @@ Status XFetchName ( *name = (char *)data; return(1); } - if (data) Xfree (data); + Xfree (data); *name = NULL; return(0); } @@ -89,7 +89,7 @@ Status XGetIconName ( *icon_name = (char*)data; return(1); } - if (data) Xfree (data); + Xfree (data); *icon_name = NULL; return(0); } diff --git a/libX11/src/Font.c b/libX11/src/Font.c index 6fadd5877..650bc6f69 100644 --- a/libX11/src/Font.c +++ b/libX11/src/Font.c @@ -170,8 +170,8 @@ XFreeFont( #endif } _XFreeExtData(fs->ext_data); - if (fs->properties) - Xfree (fs->properties); + + Xfree (fs->properties); Xfree (fs); return 1; } @@ -271,7 +271,7 @@ _XQueryFont ( } } if (! fs->per_char) { - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; @@ -524,14 +524,14 @@ _XF86BigfontQueryFont ( + (reply.nCharInfos+1)/2 * 2 * sizeof(CARD16); pUniqCI = Xmalloc (nbytes); if (!pUniqCI) { - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; } if (! (fs->per_char = Xmalloc (reply.nCharInfos * sizeof(XCharStruct)))) { Xfree(pUniqCI); - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); _XEatDataWords(dpy, reply_left); return (XFontStruct *)NULL; @@ -542,7 +542,7 @@ _XF86BigfontQueryFont ( if (pIndex2UniqIndex[i] >= reply.nUniqCharInfos) { fprintf(stderr, "_XF86BigfontQueryFont: server returned wrong data\n"); Xfree(pUniqCI); - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); return (XFontStruct *)NULL; } @@ -558,7 +558,7 @@ _XF86BigfontQueryFont ( pData = Xmalloc(sizeof(XExtData)); if (!pData) { - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); return (XFontStruct *)NULL; } @@ -578,7 +578,7 @@ _XF86BigfontQueryFont ( if (extcodes->serverCapabilities & CAP_VerifiedLocal) fprintf(stderr, "_XF86BigfontQueryFont: could not attach shm segment\n"); Xfree(pData); - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); /* Stop requesting shared memory transport from now on. */ extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm; @@ -593,7 +593,7 @@ _XF86BigfontQueryFont ( && *(CARD32 *)(addr + reply.shmsegoffset + reply.nCharInfos * sizeof(XCharStruct)) == extcodes->serverSignature)) { shmdt(addr); Xfree(pData); - if (fs->properties) Xfree(fs->properties); + Xfree(fs->properties); Xfree(fs); /* Stop requesting shared memory transport from now on. */ extcodes->serverCapabilities &= ~ XF86Bigfont_CAP_LocalShm; @@ -697,8 +697,8 @@ int _XF86LoadQueryLocaleFont( #endif } _XFreeExtData(fs->ext_data); - if (fs->properties) - Xfree (fs->properties); + + Xfree (fs->properties); *fidp = fs->fid; Xfree (fs); } else { diff --git a/libX11/src/FontInfo.c b/libX11/src/FontInfo.c index 763aafb3d..a2d12c2ec 100644 --- a/libX11/src/FontInfo.c +++ b/libX11/src/FontInfo.c @@ -179,8 +179,8 @@ XFontStruct **info) /* RETURN */ Xfree(flist[j]); if (finfo[j].properties) Xfree(finfo[j].properties); } - if (flist) Xfree(flist); - if (finfo) Xfree(finfo); + Xfree(flist); + Xfree(finfo); clearwire: /* Clear the wire. */ diff --git a/libX11/src/FontNames.c b/libX11/src/FontNames.c index c50de2eeb..6fc6b1272 100644 --- a/libX11/src/FontNames.c +++ b/libX11/src/FontNames.c @@ -73,8 +73,8 @@ int *actualCount) /* RETURN */ } if ((! flist) || (! ch)) { - if (flist) Xfree(flist); - if (ch) Xfree(ch); + Xfree(flist); + Xfree(ch); _XEatDataWords(dpy, rep.length); *actualCount = 0; UnlockDisplay(dpy); diff --git a/libX11/src/GetFPath.c b/libX11/src/GetFPath.c index 76ff7327b..62ba01436 100644 --- a/libX11/src/GetFPath.c +++ b/libX11/src/GetFPath.c @@ -57,8 +57,8 @@ char **XGetFontPath( } if ((! flist) || (! ch)) { - if (flist) Xfree(flist); - if (ch) Xfree(ch); + Xfree(flist); + Xfree(ch); _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/GetHints.c b/libX11/src/GetHints.c index 5cca0bc93..513b4b090 100644 --- a/libX11/src/GetHints.c +++ b/libX11/src/GetHints.c @@ -75,7 +75,7 @@ Status XGetSizeHints ( if ((actual_type != XA_WM_SIZE_HINTS) || (nitems < OldNumPropSizeElements) || (actual_format != 32)) { - if (prop != NULL) Xfree (prop); + Xfree (prop); return(0); } hints->flags = (prop->flags & (USPosition|USSize|PAllHints)); @@ -124,7 +124,7 @@ XWMHints *XGetWMHints ( if ((actual_type != XA_WM_HINTS) || (nitems < (NumPropWMHintsElements - 1)) || (actual_format != 32)) { - if (prop != NULL) Xfree (prop); + Xfree (prop); return(NULL); } /* static copies not allowed in library, due to reentrancy constraint*/ @@ -196,7 +196,7 @@ Status XGetIconSizes ( (nitems < NumPropIconSizeElements) || (nitems % NumPropIconSizeElements != 0) || (actual_format != 32)) { - if (prop != NULL) Xfree (prop); + Xfree (prop); return(0); } @@ -204,7 +204,7 @@ Status XGetIconSizes ( nitems /= NumPropIconSizeElements; if (! (hp = hints = Xcalloc (nitems, sizeof(XIconSize)))) { - if (prop) Xfree (prop); + Xfree (prop); return 0; } @@ -239,7 +239,7 @@ Status XGetCommand ( if (!XGetTextProperty (dpy, w, &tp, XA_WM_COMMAND)) return 0; if (tp.encoding != XA_STRING || tp.format != 8) { - if (tp.value) Xfree (tp.value); + Xfree (tp.value); return 0; } @@ -254,7 +254,7 @@ Status XGetCommand ( * create a string list and return if successful */ if (!XTextPropertyToStringList (&tp, &argv, &argc)) { - if (tp.value) Xfree (tp.value); + Xfree (tp.value); return (0); } @@ -291,7 +291,7 @@ XGetTransientForHint( return (1); } *propWindow = None; - if (data) Xfree( (char *) data); + Xfree( (char *) data); return(0); } @@ -333,6 +333,6 @@ XGetClassHint( Xfree( (char *) data); return(1); } - if (data) Xfree( (char *) data); + Xfree( (char *) data); return(0); } diff --git a/libX11/src/GetNrmHint.c b/libX11/src/GetNrmHint.c index 5e4143b28..97f04b23b 100644 --- a/libX11/src/GetNrmHint.c +++ b/libX11/src/GetNrmHint.c @@ -83,7 +83,7 @@ Status XGetWMSizeHints ( if ((actual_type != XA_WM_SIZE_HINTS) || (nitems < OldNumPropSizeElements) || (actual_format != 32)) { - if (prop != NULL) Xfree (prop); + Xfree (prop); return False; } diff --git a/libX11/src/GetRGBCMap.c b/libX11/src/GetRGBCMap.c index d8a1b3f05..5d570ad3a 100644 --- a/libX11/src/GetRGBCMap.c +++ b/libX11/src/GetRGBCMap.c @@ -63,7 +63,7 @@ Status XGetRGBColormaps ( /* if wrong type or format, or too small for us, then punt */ if ((actual_type != XA_RGB_COLOR_MAP) || (actual_format != 32) || (nitems < OldNumPropStandardColormapElements)) { - if (data) Xfree (data); + Xfree (data); return False; } @@ -78,7 +78,7 @@ Status XGetRGBColormaps ( Screen *sp = _XScreenOfWindow (dpy, w); if (!sp) { - if (data) Xfree (data); + Xfree (data); return False; } def_visual = sp->root_visual->visualid; @@ -90,7 +90,7 @@ Status XGetRGBColormaps ( ncmaps = (nitems / NumPropStandardColormapElements); if ((((unsigned long) ncmaps) * NumPropStandardColormapElements) != nitems) { - if (data) Xfree (data); + Xfree (data); return False; } } @@ -101,7 +101,7 @@ Status XGetRGBColormaps ( */ cmaps = Xmalloc (ncmaps * sizeof (XStandardColormap)); if (!cmaps) { - if (data) Xfree (data); + Xfree (data); return False; } diff --git a/libX11/src/GetStCmap.c b/libX11/src/GetStCmap.c index ac5b0fa88..1cb1e0f01 100644 --- a/libX11/src/GetStCmap.c +++ b/libX11/src/GetStCmap.c @@ -81,7 +81,7 @@ Status XGetStandardColormap ( int i; if (!sp) { - if (stdcmaps) Xfree (stdcmaps); + Xfree (stdcmaps); return False; } vid = sp->root_visual->visualid; diff --git a/libX11/src/GetWMCMapW.c b/libX11/src/GetWMCMapW.c index 27f1e232c..d3ef1fea0 100644 --- a/libX11/src/GetWMCMapW.c +++ b/libX11/src/GetWMCMapW.c @@ -77,7 +77,7 @@ Status XGetWMColormapWindows ( return False; if (actual_type != XA_WINDOW || actual_format != 32) { - if (data) Xfree (data); + Xfree (data); return False; } diff --git a/libX11/src/ImUtil.c b/libX11/src/ImUtil.c index 4fc060cb8..0d996e8ec 100644 --- a/libX11/src/ImUtil.c +++ b/libX11/src/ImUtil.c @@ -434,8 +434,8 @@ Status XInitImage (XImage *image) static int _XDestroyImage (XImage *ximage) { - if (ximage->data != NULL) Xfree(ximage->data); - if (ximage->obdata != NULL) Xfree(ximage->obdata); + Xfree(ximage->data); + Xfree(ximage->obdata); Xfree(ximage); return 1; } diff --git a/libX11/src/InitExt.c b/libX11/src/InitExt.c index 0ff3732bf..4de46f157 100644 --- a/libX11/src/InitExt.c +++ b/libX11/src/InitExt.c @@ -51,7 +51,7 @@ XExtCodes *XInitExtension ( LockDisplay (dpy); if (! (ext = Xcalloc (1, sizeof (_XExtension))) || ! (ext->name = strdup(name))) { - if (ext) Xfree(ext); + Xfree(ext); UnlockDisplay(dpy); return (XExtCodes *) NULL; } diff --git a/libX11/src/KeyBind.c b/libX11/src/KeyBind.c index f64f116b8..d7c78b37e 100644 --- a/libX11/src/KeyBind.c +++ b/libX11/src/KeyBind.c @@ -271,12 +271,13 @@ _XKeyInitialize( if (! keysyms) return 0; LockDisplay(dpy); - if (dpy->keysyms) - Xfree (dpy->keysyms); + + Xfree (dpy->keysyms); dpy->keysyms = keysyms; dpy->keysyms_per_keycode = per; if (dpy->modifiermap) ResetModMap(dpy); + UnlockDisplay(dpy); } if (!dpy->modifiermap) @@ -929,8 +930,8 @@ XRebindKeysym ( ((! (p->string = Xmalloc(nbytes))) && (nbytes > 0)) || ((! (p->modifiers = Xmalloc(nb))) && (nb > 0))) { if (p) { - if (p->string) Xfree(p->string); - if (p->modifiers) Xfree(p->modifiers); + Xfree(p->string); + Xfree(p->modifiers); Xfree(p); } UnlockDisplay(dpy); diff --git a/libX11/src/ListExt.c b/libX11/src/ListExt.c index f40924df7..431ae6784 100644 --- a/libX11/src/ListExt.c +++ b/libX11/src/ListExt.c @@ -62,8 +62,8 @@ char **XListExtensions( } if ((!list) || (!ch)) { - if (list) Xfree(list); - if (ch) Xfree(ch); + Xfree(list); + Xfree(ch); _XEatDataWords(dpy, rep.length); UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/ModMap.c b/libX11/src/ModMap.c index 78d635bf5..a809aa291 100644 --- a/libX11/src/ModMap.c +++ b/libX11/src/ModMap.c @@ -50,7 +50,7 @@ XGetModifierMapping(register Display *dpy) } else res = NULL; if ((! res) || (! res->modifiermap)) { - if (res) Xfree(res); + Xfree(res); res = (XModifierKeymap *) NULL; _XEatDataWords(dpy, rep.length); } else { @@ -114,8 +114,7 @@ int XFreeModifiermap(XModifierKeymap *map) { if (map) { - if (map->modifiermap) - Xfree(map->modifiermap); + Xfree(map->modifiermap); Xfree(map); } return 1; diff --git a/libX11/src/OpenDis.c b/libX11/src/OpenDis.c index 379381489..636860e24 100644 --- a/libX11/src/OpenDis.c +++ b/libX11/src/OpenDis.c @@ -590,8 +590,7 @@ void _XFreeDisplayStructure(Display *dpy) while (dpy->ext_procs) { _XExtension *ext = dpy->ext_procs; dpy->ext_procs = ext->next; - if (ext->name) - Xfree (ext->name); + Xfree (ext->name); Xfree (ext); } if (dpy->im_filters) @@ -656,23 +655,17 @@ void _XFreeDisplayStructure(Display *dpy) } free(dpy->display_name); - if (dpy->vendor) - Xfree (dpy->vendor); - - if (dpy->buffer) - Xfree (dpy->buffer); - if (dpy->keysyms) - Xfree (dpy->keysyms); - if (dpy->xdefaults) - Xfree (dpy->xdefaults); - if (dpy->error_vec) - Xfree (dpy->error_vec); + + Xfree (dpy->vendor); + Xfree (dpy->buffer); + Xfree (dpy->keysyms); + Xfree (dpy->xdefaults); + Xfree (dpy->error_vec); _XFreeExtData (dpy->ext_data); - if (dpy->free_funcs) - Xfree (dpy->free_funcs); - if (dpy->scratch_buffer) - Xfree (dpy->scratch_buffer); + + Xfree (dpy->free_funcs); + Xfree (dpy->scratch_buffer); FreeDisplayLock(dpy); if (dpy->qfree) { @@ -687,8 +680,7 @@ void _XFreeDisplayStructure(Display *dpy) while (dpy->im_fd_info) { struct _XConnectionInfo *conni = dpy->im_fd_info; dpy->im_fd_info = conni->next; - if (conni->watch_data) - Xfree (conni->watch_data); + Xfree (conni->watch_data); Xfree (conni); } if (dpy->conn_watchers) { @@ -696,8 +688,8 @@ void _XFreeDisplayStructure(Display *dpy) dpy->conn_watchers = watcher->next; Xfree (watcher); } - if (dpy->filedes) - Xfree (dpy->filedes); + + Xfree (dpy->filedes); _XFreeX11XCBStructure(dpy); diff --git a/libX11/src/PutImage.c b/libX11/src/PutImage.c index e6ac9a23f..de085bcde 100644 --- a/libX11/src/PutImage.c +++ b/libX11/src/PutImage.c @@ -740,8 +740,7 @@ SendXYImage( bytes_per_src, bytes_per_line, bytes_per_dest, req->height, half_order); - if (extra) - Xfree(extra); + Xfree(extra); if (buf == dpy->bufptr) dpy->bufptr += length; @@ -793,8 +792,7 @@ SendZImage( ((req_xoffset == 0) || ((req_yoffset + req->height) < (unsigned)image->height))) { Data(dpy, (char *)src, length); - if (shifted_src) - Xfree(shifted_src); + Xfree(shifted_src); return; } @@ -804,7 +802,7 @@ SendZImage( else if ((dest = (unsigned char *) _XAllocScratch(dpy, length)) == NULL) { - if (shifted_src) Xfree(shifted_src); + Xfree(shifted_src); UnGetReq(PutImage); return; } @@ -831,8 +829,7 @@ SendZImage( else _XSend(dpy, (char *)dest, length); - if (shifted_src) - Xfree(shifted_src); + Xfree(shifted_src); } static void diff --git a/libX11/src/RdBitF.c b/libX11/src/RdBitF.c index 31bf583c9..8a1ad85f1 100644 --- a/libX11/src/RdBitF.c +++ b/libX11/src/RdBitF.c @@ -137,7 +137,7 @@ XReadBitmapFileData ( /* error cleanup and return macro */ #define RETURN(code) \ -{ if (bits) Xfree (bits); fclose (fstream); return code; } +{ Xfree (bits); fclose (fstream); return code; } while (fgets(line, MAX_SIZE, fstream)) { if (strlen(line) == MAX_SIZE-1) diff --git a/libX11/src/ScrResStr.c b/libX11/src/ScrResStr.c index 0601c8644..4a5491a32 100644 --- a/libX11/src/ScrResStr.c +++ b/libX11/src/ScrResStr.c @@ -48,8 +48,7 @@ char *XScreenResourceString(Screen *screen) (unsigned char **) &val) == Success) { if ((actual_type == XA_STRING) && (actual_format == 8)) return val; - if (val) - Xfree(val); + Xfree(val); } return (char *)NULL; } diff --git a/libX11/src/StBytes.c b/libX11/src/StBytes.c index ec6c2e295..d8fca17c2 100644 --- a/libX11/src/StBytes.c +++ b/libX11/src/StBytes.c @@ -74,7 +74,7 @@ char *XFetchBuffer ( *nbytes = nitems; return((char *)data); } - if ((char *) data != NULL) Xfree (data); + Xfree (data); return(NULL); } diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index a5350e953..80c12987d 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -398,8 +398,7 @@ _XUnregisterInternalConnection( watch=watch->next, wd++) { (*watch->fn) (dpy, watch->client_data, fd, False, wd); } - if (info_list->watch_data) - Xfree (info_list->watch_data); + Xfree (info_list->watch_data); Xfree (info_list); break; } @@ -1482,8 +1481,9 @@ char *_XAllocScratch( unsigned long nbytes) { if (nbytes > dpy->scratch_length) { - if (dpy->scratch_buffer) Xfree (dpy->scratch_buffer); - if ((dpy->scratch_buffer = Xmalloc(nbytes))) + Xfree (dpy->scratch_buffer); + dpy->scratch_buffer = Xmalloc(nbytes); + if (dpy->scratch_buffer) dpy->scratch_length = nbytes; else dpy->scratch_length = 0; } @@ -1511,8 +1511,8 @@ void _XFreeTemp( char *buf, unsigned long nbytes) { - if (dpy->scratch_buffer) - Xfree(dpy->scratch_buffer); + + Xfree(dpy->scratch_buffer); dpy->scratch_buffer = buf; dpy->scratch_length = nbytes; } diff --git a/libX11/src/xkb/XKBNames.c b/libX11/src/xkb/XKBNames.c index 3f2fd39d7..5a3fb6f8d 100644 --- a/libX11/src/xkb/XKBNames.c +++ b/libX11/src/xkb/XKBNames.c @@ -778,9 +778,14 @@ XkbNoteNameChanges(XkbNameChangesPtr old, { int first, last, old_last, new_last; - wanted &= new->changed; - if ((old == NULL) || (new == NULL) || (wanted == 0)) + if ((old == NULL) || (new == NULL)) return; + + wanted &= new->changed; + + if (wanted == 0) + return; + if (wanted & XkbKeyTypeNamesMask) { if (old->changed & XkbKeyTypeNamesMask) { new_last = (new->first_type + new->num_types - 1); diff --git a/libX11/src/xlibi18n/lcUTF8.c b/libX11/src/xlibi18n/lcUTF8.c index 0f3d0d2ca..38201573e 100644 --- a/libX11/src/xlibi18n/lcUTF8.c +++ b/libX11/src/xlibi18n/lcUTF8.c @@ -1015,7 +1015,7 @@ ucstocs1( XPointer *args, int num_args) { - ucs4_t const *src = (ucs4_t const *) *from; + ucs4_t const *src; unsigned char *dst = (unsigned char *) *to; int unconv_num = 0; Utf8Conv *preferred_charsets = (Utf8Conv *) conv->state; @@ -1027,6 +1027,8 @@ ucstocs1( if (from == NULL || *from == NULL) return 0; + src = (ucs4_t const *) *from; + count = charset_wctocs_exactly(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, *src, *to_left); if (count < 1) { diff --git a/libXdmcp/autogen.sh b/libXdmcp/autogen.sh index 904cd6746..fc34bd55c 100644 --- a/libXdmcp/autogen.sh +++ b/libXdmcp/autogen.sh @@ -9,4 +9,6 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? -$srcdir/configure --enable-maintainer-mode "$@" +if test -z "$NOCONFIGURE"; then + $srcdir/configure "$@" +fi diff --git a/libXdmcp/configure.ac b/libXdmcp/configure.ac index 4e85650e7..cf6b30921 100644 --- a/libXdmcp/configure.ac +++ b/libXdmcp/configure.ac @@ -29,7 +29,6 @@ AC_CONFIG_HEADERS([config.h]) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE # Initialize libtool AC_LIBTOOL_WIN32_DLL diff --git a/libXft/NEWS b/libXft/NEWS index b547c7835..2a08f90e1 100644 --- a/libXft/NEWS +++ b/libXft/NEWS @@ -7,6 +7,14 @@ Xft version 2.1 was the first stand alone release of Xft, a library that connects X applications with the FreeType font rasterization library. Xft uses fontconfig to locate fonts so it has no configuration files. +Version 2.3.2 + +Build fix for freetype 2.5.1, man page fix for XftDrawString8 & XftDrawRect. + +Version 2.3.1 + +Fix regression that broke bold fonts in 2.3.0, remove dead code. + Version 2.3.0 Subpixel LCD text rendering improvements diff --git a/libXft/configure.ac b/libXft/configure.ac index 013d9a64b..840710d53 100644 --- a/libXft/configure.ac +++ b/libXft/configure.ac @@ -27,7 +27,7 @@ AC_PREREQ([2.60]) # version. This version number will be substituted into Xft.h # Please bump the minor library number at each release as well. # -AC_INIT([libXft], [2.3.1], +AC_INIT([libXft], [2.3.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXft]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) diff --git a/mesalib/configure.ac b/mesalib/configure.ac index bee85a131..a12f27ac2 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -552,7 +552,13 @@ dnl See if posix_memalign is available AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) dnl Check for pthreads -AX_PTHREAD +case "$host_os" in +mingw*) + ;; +*) + AX_PTHREAD + ;; +esac dnl AX_PTHREADS leaves PTHREAD_LIBS empty for gcc and sets PTHREAD_CFLAGS dnl to -pthread, which causes problems if we need -lpthread to appear in dnl pkgconfig files. @@ -870,14 +876,21 @@ fi case "$host_os" in linux*) - need_libudev=yes ;; + need_pci_id=yes ;; *) - need_libudev=no ;; + need_pci_id=no ;; esac PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED], have_libudev=yes, have_libudev=no) +AC_ARG_ENABLE([sysfs], + [AS_HELP_STRING([--enable-sysfs], + [enable /sys PCI identification @<:@default=disabled@:>@])], + [have_sysfs="$enableval"], + [have_sysfs=no] +) + if test "x$enable_dri" = xyes; then if test "$enable_static" = yes; then AC_MSG_ERROR([Cannot use static libraries for DRI drivers]) @@ -973,8 +986,15 @@ xyesno) ;; esac +have_pci_id=no if test "$have_libudev" = yes; then DEFINES="$DEFINES -DHAVE_LIBUDEV" + have_pci_id=yes +fi + +if test "$have_sysfs" = yes; then + DEFINES="$DEFINES -DHAVE_SYSFS" + have_pci_id=yes fi # This is outside the case (above) so that it is invoked even for non-GLX @@ -1076,8 +1096,8 @@ if test "x$enable_dri" = xyes; then DEFINES="$DEFINES -DHAVE_DRI3" fi - if test "x$have_libudev" != xyes; then - AC_MSG_ERROR([libudev-dev required for building DRI]) + if test "x$have_pci_id" != xyes; then + AC_MSG_ERROR([libudev-dev or sysfs required for building DRI]) fi case "$host_cpu" in @@ -1252,8 +1272,8 @@ if test "x$enable_gbm" = xauto; then esac fi if test "x$enable_gbm" = xyes; then - if test "x$need_libudev$have_libudev" = xyesno; then - AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED]) + if test "x$need_pci_id$have_pci_id" = xyesno; then + AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED or sysfs]) fi if test "x$enable_dri" = xyes; then @@ -1271,7 +1291,7 @@ if test "x$enable_gbm" = xyes; then fi fi AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes) -if test "x$need_libudev" = xyes; then +if test "x$need_pci_id$have_libudev" = xyesyes; then GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED" else GBM_PC_REQ_PRIV="" @@ -1560,9 +1580,9 @@ for plat in $egl_platforms; do ;; esac - case "$plat$need_libudev$have_libudev" in + case "$plat$need_pci_id$have_pci_id" in waylandyesno|drmyesno) - AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;; + AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED or sysfs]) ;; esac done @@ -1843,8 +1863,8 @@ gallium_require_llvm() { gallium_require_drm_loader() { if test "x$enable_gallium_loader" = xyes; then - if test "x$need_libudev$have_libudev" = xyesno; then - AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED]) + if test "x$need_pci_id$have_pci_id" = xyesno; then + AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED or sysfs]) fi if test "x$have_libdrm" != xyes; then AC_MSG_ERROR([Gallium drm loader requires libdrm >= $LIBDRM_REQUIRED]) diff --git a/mesalib/docs/GL3.txt b/mesalib/docs/GL3.txt index c360f2cb7..d26c8124d 100644 --- a/mesalib/docs/GL3.txt +++ b/mesalib/docs/GL3.txt @@ -101,10 +101,10 @@ GL 4.0: GL_ARB_draw_buffers_blend DONE (i965, nv50, nvc0, r600, radeonsi, softpipe) GL_ARB_draw_indirect DONE (i965) GL_ARB_gpu_shader5 started - - 'precise' qualifier not started + - 'precise' qualifier DONE - Dynamically uniform sampler array indices not started - Dynamically uniform UBO array indices not started - - Implicit signed -> unsigned conversions not started + - Implicit signed -> unsigned conversions DONE - Fused multiply-add DONE - Packing/bitfield/conversion functions DONE - Enhanced textureGather DONE @@ -112,9 +112,9 @@ GL 4.0: - Geometry shader multiple streams not started - Enhanced per-sample shading DONE - Interpolation functions started - - New overload resolution rules not started + - New overload resolution rules DONE GL_ARB_gpu_shader_fp64 not started - GL_ARB_sample_shading DONE (i965, nv50, nvc0) + GL_ARB_sample_shading DONE (i965, nv50, nvc0, radeonsi) GL_ARB_shader_subroutine not started GL_ARB_tessellation_shader not started GL_ARB_texture_buffer_object_rgb32 DONE (i965, nvc0, r600, radeonsi, softpipe) diff --git a/mesalib/docs/index.html b/mesalib/docs/index.html index 28a70467d..2e78343de 100644 --- a/mesalib/docs/index.html +++ b/mesalib/docs/index.html @@ -16,6 +16,20 @@

News

+

June 6, 2014

+

+Mesa 10.2.1 is released. This release +only fixes a build error in the radeonsi driver that was introduced between +10.2-rc5 and the 10.2 final release. +

+ +

June 6, 2014

+

+Mesa 10.2 is released. This is a new +development release. See the release notes for more information about +the release. +

+

May 20, 2014

Mesa 10.1.4 is released. diff --git a/mesalib/docs/llvmpipe.html b/mesalib/docs/llvmpipe.html index 74f0c67d8..291527be8 100644 --- a/mesalib/docs/llvmpipe.html +++ b/mesalib/docs/llvmpipe.html @@ -43,11 +43,7 @@ It's the fastest software rasterizer for Mesa.

  • -

    LLVM: version 2.9 recommended; 2.6 or later required.

    -

    NOTE: LLVM 2.8 and earlier will not work on systems that support the - Intel AVX extensions (e.g. Sandybridge). LLVM's code generator will - fail when trying to emit AVX instructions. This was fixed in LLVM 2.9. -

    +

    LLVM: version 3.4 recommended; 3.1 or later required.

    For Linux, on a recent Debian based distribution do:

    @@ -101,13 +97,15 @@ but the rest of these instructions assume that scons is used. For Windows the procedure is similar except the target:
    -  scons build=debug libgl-gdi
    +  scons platform=windows build=debug libgl-gdi
     

    Using

    -On Linux, building will create a drop-in alternative for libGL.so into +

    Linux

    + +

    On Linux, building will create a drop-in alternative for libGL.so into

       build/foo/gallium/targets/libgl-xlib/libGL.so
    @@ -117,15 +115,45 @@ or
       lib/gallium/libGL.so
     
    -To use it set the LD_LIBRARY_PATH environment variable accordingly. +

    To use it set the LD_LIBRARY_PATH environment variable accordingly.

    + +

    For performance evaluation pass build=release to scons, and use the corresponding +lib directory without the "-debug" suffix.

    + -For performance evaluation pass debug=no to scons, and use the corresponding -lib directory without the "-debug" suffix. +

    Windows

    -On Windows, building will create a drop-in alternative for opengl32.dll. To use -it put it in the same directory as the application. It can also be used by +

    +On Windows, building will create +build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll +which is a drop-in alternative for system's opengl32.dll. To use +it put it in the same directory as your application. It can also be used by replacing the native ICD driver, but it's quite an advanced usage, so if you need to ask, don't even try it. +

    + +

    +There is however an easy way to replace the OpenGL software renderer that comes +with Microsoft Windows 7 (or later) with llvmpipe (that is, on systems without +any OpenGL drivers): +

    + +

    Profiling

    diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html index 7437e9b5b..60d007326 100644 --- a/mesalib/docs/relnotes.html +++ b/mesalib/docs/relnotes.html @@ -21,6 +21,8 @@ The release notes summarize what's new or changed in each Mesa release.