Commit graph

1033 commits

Author SHA1 Message Date
Alan Coopersmith
3facbe5c0d Add <X11/Xresource.h> hint to all Xrm* man pages
Help users figure out which header file they need to #include

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-08 17:17:02 -08:00
Alan Coopersmith
466404007f _xudc_code_to_glyph: check for NULL pointer *before* writing to it, not after
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-08 17:17:00 -08:00
Ken Moffat
47d2eff64d
dead_double_grave and dead_inverted_breve should only have one underscore.
Correct instances of dead_double_grave and dead_inverted_breve to
dead_doublegrave and dead_invertedbreve.

Signed-off-by: Ken Moffat <ken@linuxfromscratch.org>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2013-03-07 18:27:54 -05:00
Alan Coopersmith
c23d61d1b8 Assume size_t is always available, since it was defined in C89
Don't provide a fallback definition #ifdef X_NOT_POSIX anymore.
We already use size_t throughout the rest of Xlib, just had this
one instance left in XKBGAlloc.c of a fallback definition.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-03-03 18:20:50 -08:00
Alan Coopersmith
9bcfd84aa1 unifdef XKB_IN_SERVER
Leftovers from XKB files that were previously shared between the client
and server code, but aren't any more.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-03-03 18:20:45 -08:00
Alan Coopersmith
769a0efa22 unifdef CRAY & _CRAY
(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>
2013-03-03 18:20:41 -08:00
Alan Coopersmith
ca106eb03e unifdef WORD64
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>
2013-03-03 18:20:34 -08:00
Alan Coopersmith
9399caf2c1 unifdef MUSTCOPY
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>
2013-03-03 18:20:10 -08:00
Alan Coopersmith
b687440c28 Convert more sprintf calls to snprintf
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>
2013-02-16 10:42:23 -08:00
Alan Coopersmith
b092dabbd7 XKeysymToString: move variable declarations to the scope of their usage
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>
2013-02-16 10:20:53 -08:00
Alan Coopersmith
f0b171c8ea Preserve constness in casting arguments through the Data*() routines
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>
2013-02-16 10:20:53 -08:00
Alan Coopersmith
6c558ee357 Fix comment typo & confusing indentation levels in Data() macro definition
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>
2013-02-16 10:20:53 -08:00
Alan Coopersmith
afd6593da9 XStringToKeysym: preserve constness when casting off unsignedness for strcmp
Fixes gcc warning:
StrKeysym.c:97:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-02-16 10:20:53 -08:00
Alan Coopersmith
7e3bf4dd83 XRebindKeysym: Drop unnecessary const-removing cast
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>
2013-02-16 10:20:52 -08:00
Alan Coopersmith
54527eab93 cmsColNm.c: maintain constness of arguments to qsort helper function
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>
2013-02-15 22:45:19 -08:00
Nickolai Zeldovich
deedeada53 XListFontsWithInfo: avoid accessing realloc'ed memory
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>
2013-02-15 22:26:38 -08:00
Colin Walters
f57fd760cb autogen.sh: Implement GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-15 14:32:12 -05:00
Adam Jackson
51c102d39e configure: Remove AM_MAINTAINER_MODE
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-15 14:28:48 -05:00
Alan Coopersmith
3cd974b1d4 Remove unused DECnet ("DNETCONN") code from Xlib
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>
2013-01-09 20:50:32 -08:00
Alan Coopersmith
a6e5b36a3e Remove unused TLI ("STREAMSCONN") code from Xlib
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>
2013-01-09 20:50:32 -08:00
Alan Coopersmith
59c9ee8cd5 Tell clang not to report -Wpadded warnings on public headers we can't fix
Better to silence the compiler warning than break ABI.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-09 20:50:32 -08:00
Jon TURNEY
0b14875002 Fix config check for loadable modules
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>
2013-01-09 14:49:41 +00:00
Egbert Eich
cd25cab4b5 Install Xcms.txt in $(datadir) rather than $(libdir).
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>
2013-01-03 10:36:13 -05:00
Egbert Eich
51fef7e273 Don't hard code path to Xcms.txt file.
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>
2013-01-03 10:35:43 -05:00
Colin Walters
9833489e6c Fix build after dropping locales
They also needed to be removed from configure.ac

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2012-12-07 15:13:14 +01:00
Egbert Eich
0a740a574a i18n: Uppercased all occurances if 'iso8859' in the full locale name.
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>
2012-12-06 05:46:17 -05:00
Egbert Eich
5e7d589697 i18n: Remove ja.S90 and ja.U90 locales.
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>
2012-12-06 05:46:17 -05:00
Egbert Eich
99eae3dcb7 i18n: Bring locale.dir and compose.dir in sync.
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>
2012-12-06 05:46:17 -05:00
Egbert Eich
d1e6baa4e2 i18n: Treat 'a3_AZ' as an alias for 'az_AZ'.
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>
2012-12-06 05:46:06 -05:00
Egbert Eich
fa2aab0bea i18n: Fixed typos in full locale names.
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>
2012-12-05 11:51:19 -05:00
Egbert Eich
b88dd95005 i18n: Remove duplicates and aliases to oneself.
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>
2012-12-03 05:18:40 -05:00
Jens Herden
f198c6aa98 i18n: Add support for Khmer locale and compose table.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
2012-12-03 05:18:17 -05:00
Kalman Kemenczy
4076189869 i18n: Add support for Serbian specific compose table entries.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
2012-12-03 05:17:53 -05:00
Egbert Eich
7c14aacc9f i18n: Adding and removing comments.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
2012-12-03 05:16:46 -05:00
Egbert Eich
7754d68976 i18n: Add missing locales which existed in locale.alias.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
2012-12-03 05:16:31 -05:00
Egbert Eich
952eccd0d2 i18n: Consolidate compose handling for locales with UTF-8 encoding.
- 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>
2012-11-30 09:36:51 -05:00
Yaakov Selkowitz
d14b6a250f XIM: remove Private and Public macros
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>
2012-10-29 18:43:35 -05:00
Adam Jackson
f2a8def423 XErrorDB: Add GLXBadProfileARB
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-10-17 14:41:06 -04:00
Ross Burton
d45b3fc19f Allow overriding location of keysymdef.h
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>
2012-09-12 22:30:39 +01:00
Eric S. Raymond
44cdc0dc2c Renove some unnecessary low-level markup.
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>
2012-08-23 19:15:07 -04:00
Eric S. Raymond
b686600ab5 The .NT/.NE macro pair is no longer used. Remove it.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-08-23 10:53:33 -04:00
Eric S. Raymond
b83f289852 Remove the one and only use of the .NT/.NE pair.
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.
2012-08-23 10:42:46 -04:00
Eric S. Raymond
e9509fa674 The .C{ and .C} macros are never used. Remove them.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-08-23 10:23:45 -04:00
Eric S. Raymond
6b2f7ddeea The .FN macro, paired with .FD, is also never used. Remove it.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-08-23 10:08:08 -04:00
Eric S. Raymond
cac6572701 The ".FD" macro is never used. Remove it.
It was a temptation to presentation-level klugery and is best gone.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-08-23 10:03:00 -04:00
Eric S. Raymond
6e27a828f3 Clean up, my last commit missed four cases.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
2012-08-23 09:54:25 -04:00
Eric S. Raymond
a7fb575957 Eliminate all uses of tab stops in the libX11 man pages.
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>
2012-08-23 08:24:17 -04:00
Will Thompson
8042f88ace Add compose sequences for "therefore" and "because".
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>
2012-07-13 10:46:07 +01:00
Alan Coopersmith
65358ea507 Convert XCreate{Pix,Bit}map...Data to use C99 designated initializers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-07-08 09:17:29 -07:00
Alan Coopersmith
0dc93f7e43 XCreate{Pix,Bit}map...Data: Free pixmap in error path if XCreateGC fails
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>
2012-07-08 09:17:22 -07:00