(mostly performed with unifdef, followed by some manual cleanup of
the remaining code)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
WORD64 seems to have only been defined in <X11/Xmd.h> when building for
CRAY, to handle int being a 64-bit value (ILP64, not LP64) and having
64-bit alignment requirements.
It hadn't been fully supported even before autotooling, as can be
seen by removed code such as:
#ifdef WORD64
_XkbWriteCopyData32 Not Implemented Yet for sizeof(int)==8
#endif
(mostly performed with unifdef, followed by some manual cleanup of
the remaining code)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
MUSTCOPY seems to have only been defined in <X11/Xmd.h> when building for
CRAY, to handle missing some sizes of integer type.
(mostly performed with unifdef, followed by some manual cleanup of
spacing/indenting in the remaining code)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
You could analyze most of these and quickly recognize that there was no
chance of buffer overflow already, but why make everyone spend time doing
that when we can just make it obviously safe?
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Makes it easier for readers to understand scope of variable usage, and
clears up gcc warning:
KeysymStr.c: In function 'XKeysymToString':
KeysymStr.c:128:13: warning: declaration of 'i' shadows a previous local [-Wshadow]
KeysymStr.c:73:18: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Casts were annoying gcc by dropping constness when changing types,
when routines simply either copy data into the request buffer or
send it directly to the X server, and never modify the input.
Fixes gcc warnings including:
ChProp.c: In function 'XChangeProperty':
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:65:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:74:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
ChProp.c:83:6: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetHints.c: In function 'XSetStandardProperties':
SetHints.c:262:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c: In function 'XSetPointerMapping':
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
SetPntMap.c:46:5: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StBytes.c: In function 'XStoreBuffer':
StBytes.c:97:33: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XStoreName':
StName.c:40:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
StName.c: In function 'XSetIconName':
StName.c:51:27: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
The final } matches the one on the #define line, not one that doesn't
appear after the else statement it was lined up with
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
C89 defines memcpy as taking a const void *, so casting from
const unsigned char * to char * simply angers gcc for no benefit:
KeyBind.c:1017:24: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Fixes gcc warning:
cmsColNm.c: In function 'FirstCmp':
cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
If exactly one of the two reallocs in XListFontsWithInfo() fails, the
subsequent code accesses memory freed by the other realloc.
Signed-off-by: Nickolai Zeldovich <nickolai@csail.mit.edu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Has never been converted to build in modular builds, so has been unusable
since X11R7.0 release in 2005. DNETCONN support was removed from xtrans
back in 2008.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Has never been converted to build in modular builds, so has been unusable
since X11R7.0 release in 2005. All known platforms with TLI/XTI support
that X11R7 & later releases run on also have (and mostly prefer) BSD
socket support for their networking API.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
The config check of the results of testing for dlfcn.h or dl.h just tests the
value of the ac_cv_ variables, which will be 'yes' or 'no', rather than checking
it is 'yes', so loadable module support would always be detected.
This is necessary for successful compilation for the MinGW target without the
optional dlfcn-win32 library.
v2: Also, fixed typoed name of ac_cv_header_dlfcn_h, so check still works
correctly when dlfcn.h is available
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
This file is an architecture independent data and should be where
other databases are.
This is the Xlib provided sample file, applications are free to
use a different one specifying its location in the XCMSDB env
variable.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
The path to this file is configurable at build time. The source
however contains a hard coded path.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Making all occurances of iso8859 upper case in the full local name
makes the alias entries more consistent and match the entries on
locale.dir.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Both locales carry a copyright notice and a prorietary statement:
Copyright 1995 by FUJITSU LIMITED
This is source code modified by FUJITSU LIMITED under the Joint
Development Agreement for the CDEnext PST.
This is unpublished proprietary source code of FUJITSU LIMITED
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Some entries for locale/encoding combinations were missing from
either file or just misspelled, some entries were wrong or just
aliases.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
locale.alias contains a comment:
XCOMM a3 is not an ISO 639 language code, but in Cyrillic, "Z" looks like "3".
Thus lets treat 'a3' as an alias for 'az'.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Fixing those typos those names actually match entries in
locale.dir.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Aliases to itself don't make much sense.
This changes occurances of:
xy_UV.UTF-8: xy_UV.UTF-8
to
xy_UV: xy_UV.UTF-8
where applicable.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
- add an entry to include the default en_US compose file
for the ja_JP, ko_KR, th_TH, zh_CN, zh_HK and zh_TW locales.
- add missing entries for zh_CN. and zh_HK and am_ET.
- change entries for the UTF-8 encoding for ru_RU, ja_JP,
ko_KR, th_TH and zh_TW to point to their native directory
entries.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
Private is a struct member name in mingw-w64 <winioctl.h>, causing this
useless define in a private header to break the build.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Currently keysymdef.h is found by using the includedir of xproto. This doesn't
work when cross-compiling with a sysroot as that ends up being /usr/include/X11,
not a path into the cross-build environment.
So, add an option to allow explicitly specifying the location of keysymdef.h,
and verify that the specified or found path exists.
(original patch by Martin Jansa <martin.jansa@gmail.com>, revised by myself)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Also, SYNTAX -> SYNOPSIS so function prototypes get parsed by doclifter.
This appears to have been somebody's thinko, it's only in a few of the files.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
The problem with these macros is that they rely on being able to
center the note label. That doesn't play well with modern HTML,
not anyway without coomplications like CSS. This use was just a cute
trick, not adding enough value to be kept.
Two steps: First, expand tabs to 8 spaces in code and structure
listings. Second, make the .Ds used to wrap code listings switch to
constant-width font (CW) rather than numeric font position 1, which
maps to R on most systems.
It is possible some archaic systems won't know what CW is, but the
only risk is that code listings won't look quite right on troff
devices; the PostScript and DVI drivers definitely grok it, so those
important cases are OK.
The purpose of these changes is to get rid of presentation-level
markup so these pages will lift clean to DocBook.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
These sequences look sensible to me. I added them to the APL-related
section of Mathematical Operators—they're in that section of Unicode
anyway.
https://bugs.freedesktop.org/show_bug.cgi?id=51922
Signed-off-by: Will Thompson <will@willthompson.co.uk>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Fixes leaks in error paths found by Parfait 1.0.0:
Error: X Resource Leak
Leaked X Resource pix
at line 62 of CrBFData.c in function 'XCreateBitmapFromData'.
pix initialized at line 60 with XCreatePixmap
Error: X Resource Leak
Leaked X Resource pix
at line 70 of CrPFBData.c in function 'XCreatePixmapFromBitmapData'.
pix initialized at line 66 with XCreatePixmap
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reassigned squences with minus and a or o (vice versa and lower and
upper case) to conform existing series and not resulting in tilde.
Also added noe missing underscore sequence.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>