Commit graph

806 commits

Author SHA1 Message Date
Erkki Seppälä
be3e6c205d Xrm: Handle the extremely unlikely situation of fstat failing
Tracked variable "size" was passed to a negative sink.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:46:13 -08:00
Erkki Seppälä
3fae16c64d Xrm: NEWTABLE had a memory leak after a memory allocation error
The NEWTABLE macro missed freeing its allocated memory on subsequent
memory allocation errors. Added call to Xfree.

Variable "table" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:46:06 -08:00
Erkki Seppälä
7110ac6533 ImUtil: Handle a memory leak in one early return branch
Fixed memory leak by adding Xfree for image

Variable "image" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:46:00 -08:00
Erkki Seppälä
d695f5da9f ximcp/imRm: Handle leaking colormap_ret
Fixed memory leak by adding Xfree for colormap_ret

Variable "colormap_ret" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:53 -08:00
Erkki Seppälä
f9eda19d08 ximcp/imRmAttr: Handle leaking missing_list
Fixed memory leak by adding Xfree and initializing missing_list with NULL

Variable "missing_list" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:45 -08:00
Erkki Seppälä
3183269e09 ximcp/imRmAttr: Handle leaking colormap_ret
XFree colormap_ret and initialize it when appropriate.

Variable "colormap_ret" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:40 -08:00
Erkki Seppälä
f66a032a93 xlibi18n/lcGeneric: Initialize uninitialized local variable
Using uninitialized value "new"

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:35 -08:00
Erkki Seppälä
d0266e06d3 xcmx/cmxColNm: Removed unused assignments to pBuf (in two functions)
Pointer "pBuf" returned from "fgets(buf, 256, stream)" is never used

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:21 -08:00
Alan Coopersmith
cc686655d7 XDefaultOMIF.c: Fix memory leaks in get_font_name
Instead of copying the value returned by get_prop_name and then releasing it,
directly use the return value of get_prop_name, which allocates memory for the
name.

If get_prop_name returns NULL, continue on to XFreeFont to release the font
before returning the NULL via the normal function return.

Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:09 -08:00
Gaetan Nadon
9579635143 config: comment, minor upgrade, quote and layout configure.ac
Group statements per section as per Autoconf standard layout
Quote statements where appropriate.
Autoconf recommends not using dnl instead of # for comments

Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
Remove redundant AC_CANONICAL_HOST included in XORG_DEFAULT_OPTIONS

This helps automated maintenance and release activities.
Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-02-01 13:56:40 -05:00
Erkki Seppälä
e994ab227e Comparing array against NULL is not useful "&xkb->server->vmods != NULL"
Removed superfluous comparison.

Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-01-31 11:23:13 +02:00
Erkki Seppälä
4115f051e6 Variable "entry" tracked as NULL was dereferenced.
Check entry for non-nullness before dereferencing it

Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-01-31 11:23:13 +02:00
Erkki Seppälä
0edb76d1d5 Dereferencing possibly NULL "str" in call to function "memcpy" (Deref assumed on the basis of 'nonnull' parameter attribute.)
If _XkbGetReadBufferPtr returns NULL, goto BAILOUT

Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-01-31 11:23:13 +02:00
Erkki Seppälä
59da8a211e Using freed pointer "e"
Reordered code to first to do the comparison and then to release data

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
2011-01-31 11:23:13 +02:00
Matt Dew
0f11c229f7 Remove <literal> tags from compose-chart.pl so pdf building doesn't die on soft-hyphens.
Signed-off-by: Matt Dew <marcoz@osource.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-28 15:32:02 -08:00
Gaetan Nadon
ca00bb202f config: replace deprecated AC_HELP_STRING with AS_HELP_STRING
This silences an Automake warning.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-28 16:07:07 -05:00
Gaetan Nadon
8dac08c751 config: remove unrequired AC_HEADER_STDC
Autoconf says:
"This macro is obsolescent, as current systems have conforming
header files. New programs need not use this macro".
2011-01-28 15:03:59 -05:00
Alan Coopersmith
d4483375e3 config: Use correct AC_CONFIG_HEADERS macro
Replaces obsolete AM_CONFIG_HEADER and undocumented AC_CONFIG_HEADER

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2011-01-19 16:44:57 -08:00
Alan Coopersmith
c6405fe931 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-01-18 19:36:47 -08:00
Alan Coopersmith
17aa1f2305 Update to xf86bigfontproto >= 1.2.0 header name
Clears compile-time warning of:
"X11/extensions/xf86bigfstr.h", line 1: #warning: "xf86bigfstr.h is obsolete and may be removed in the future."
"X11/extensions/xf86bigfstr.h", line 2: #warning: "include <X11/extensions/xf86bigfproto.h> for the protocol defines."

Requires xf86bigfontproto >= 1.2.0 if --disable-xf86bigfont is not
passed to configure.

Also removes unnecessary AC_SUBST of BIGFONT_CFLAGS & BIGFONT_LIBS
that PKG_CHECK_MODULES does automatically

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
2011-01-18 19:28:30 -08:00
Alan Coopersmith
a9228fcc67 libX11 1.4.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-11 17:55:22 -08:00
Pauli Nieminen
92fa96451a Initialize event type
If we receive unsupported event closing connection triggers valgrind
error.

==12017== Conditional jump or move depends on uninitialised value(s)
==12017==    at 0x487D454: _XFreeDisplayStructure (OpenDis.c:607)
==12017==    by 0x486857B: XCloseDisplay (ClDisplay.c:72)
*snip*
==12017==  Uninitialised value was created by a heap allocation
==12017==    at 0x4834C48: malloc (vg_replace_malloc.c:236)
==12017==    by 0x4894147: _XEnq (XlibInt.c:877)
==12017==    by 0x4891BF3: handle_response (xcb_io.c:335)
==12017==    by 0x4892263: _XReply (xcb_io.c:626)
*snip*

Problem is that XFreeDisplaySturture is checking for qelt->event.type ==
GenericEvent while _XUnknownWireEvent doesn't store the type.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
2011-01-03 12:28:19 -05:00
Fernando Carrijo
fa9747b9d4 specs: convert images from gif to svg format.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-12-28 17:56:31 -05:00
Philipp Reh
0012e2a4ea Events: Store event cookie when dequeuing event
When we dequeue an event in XCheckTypedEvent or XCheckTypedWindowEvent,
make sure to store the corresponding cookie too.

Signed-off-by: Philipp Reh <sefi@s-e-f-i.de>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-12-22 15:19:12 +00:00
Alan Coopersmith
d2714d65e8 Revert "Mark atom names argument to XInternAtoms as const"
This reverts commit c870111546.

The constification of a pointer to a pointer caused unexpected issues,
and xorg-devel was unable to come up with a clean, safe, reasonable way
to handle them, so we're chalking this up for now as yet another mistake
in the Xlib API definition we'll be living with.

See https://bugs.freedesktop.org/show_bug.cgi?id=32098 for details.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-21 18:51:17 -08:00
Alan Coopersmith
6459f9a48a specs/XKB: make acknowlegement section <preface> instead of <chapter>
Fixes numbering of actual chapters to match their filenames and to
make the table/figure numbering match the references in the text.

Reported-by: jelmd on freenode irc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-12-21 13:57:10 -08:00
Alan Coopersmith
42c653d541 Add XKBlib spec images to dist_spec_DATA for distribution & installation
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2010-12-21 13:56:14 -08:00
Matt Dew
8f8a3c8c42 specs: convert XKBlib spec from Framemaker to DocBook.xml
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-30 10:52:55 -05:00
Alan Coopersmith
c870111546 Mark atom names argument to XInternAtoms as const
Updates code & docs for XInternAtoms.

The single atom name argument to XInternAtom was already const char *
in the code, but not the docs, so updated it in the docs too.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-24 15:23:27 -08:00
Alan Coopersmith
24db5b5ff0 libX11 1.4.0
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-21 14:04:32 -08:00
Dan Nicholson
18d3c3e9de config: Check host string when deciding architecture to build for
When checking for the OS/2 platform, $target_os is used. However, unless
building a cross compiler, the $host* strings contain the platform
details for the build system. See:

http://www.gnu.org/software/automake/manual/automake.html#Cross_002dCompilation

$host_os is already being used to determine the transport and threading
options.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-10 20:35:31 -08:00
Dan Nicholson
affc2488a7 config: Fix architecture check for OS/2 to skip nios2 cpu
The OS/2 platform requires some utility functions as well as having a
non-32 bit wchar_t. Fix the configure check so that it doesn't also
affect the nios2 cpu, which wouldn't influence these operating system
issues.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-11-10 20:33:59 -08:00
Gaetan Nadon
8cbca8a107 config: HTML file generation: use the installed copy of xorg.css
Currenlty the xorg.css file is copied in each location
where a DocBook/XML file resides. This produces about
70 copies in the $(docdir) install tree.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-11-09 13:04:44 -05:00
Alan Coopersmith
3e8907305e libX11 1.3.99.903 (1.4.0 RC3)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29 22:02:10 -07:00
Alan Coopersmith
5d245d8013 Require xorg-macros 1.11 now that it is released
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29 22:01:39 -07:00
Dan Nicholson
1ec89689fc docs: Disable fop documentation by default
fop is used to generate the pdf and ps formats of the documentation.
This can significantly slow down the build, especially when creating all
the compose key charts. Since few people probably want the full set of
doc formats, set the default to 'no'.

The default parameter for XORG_WITH_FOP is only available in recent
macros. Users generating configure from older macros will just get
'auto' as the default.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-29 00:21:13 -07:00
Jon TURNEY
03877bda91 Add C.UTF-8 and C.ASCII locale aliases
Add C.UTF-8 locale as an alias for en_US.UTF-8
Add C.ASCII locale as an alias for C

(C.UTF-8 is the default locale for cygwin.  It also exists in debian,
although I don't think it's intended for use by humans.)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: James Cloos <cloos@jhcloos.com>
2010-10-28 19:50:54 +01:00
Dan Nicholson
81d1d9a6bd docs: Remove directory prerequisites from make rules
Make expects prerequisites to be files with valid timestamps, and
directories are treated as always being out of date. Thus, any targets
depending on directories will always be rebuilt.

Instead, the doc rules are changed to always create the target's leading
directory. This should prevent the documentation from being rebuilt when
"make install" is run.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-10 09:43:55 -07:00
Jeremy Huddleston
d0cbf38891 Add an "X11_" string to header guards to avoid possible collision
This addresses a build failure which can result from <X11/Xlocale.h> and
<xlocale.h> being included in the same code since they both used the same
_XLOCALE_H_ protection.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-26 21:21:16 -07:00
Alan Coopersmith
b51ac675f4 libX11 1.3.99.902 (1.4.0 RC2)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-21 19:53:03 -07:00
Alan Coopersmith
986bb6d1d5 Bug 19379 - Provide docs with overview of all compose key combinations
Adds compose-chart.pl to generate DocBook/XML documents listing compose
keys, and Makefile rules to generate HTML & PDF output from them if xmlto
is present.

https://bugs.freedesktop.org/show_bug.cgi?id=19379

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: James Cloos <cloos@jhcloos.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-09-21 18:22:21 -07:00
Alan Coopersmith
3eb0640716 Make locale data build non-recursive / parallelizable
On a 4 core CPU with gmake -j 16 the nls subdir builds in half the time,
plus this simplifies the next set of changes.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: James Cloos <cloos@jhcloos.com>
Tested-by: Gaetan Nadon <memsize@videotron.ca>
2010-09-21 18:22:21 -07:00
Gaetan Nadon
a3fc78ac35 config: remove man page suffix from bottom summary
The man page suffix is the same for all libraries on a given
platform and is not configurable. It should have been removed
in commit 09edc6de6.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-09-17 17:38:11 -04:00
Gaetan Nadon
a52b0068f3 config: remove unhelpful comment in .gitignore
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-09-17 17:29:30 -04:00
Adam Jackson
10dd881e78 Zero buffer data in BufAlloc()
Inspired by a pattern in NoMachine's NX.  Consistently zeroed buffers
compress better with ssh and friends.  Note that you'll need to rebuild
all your protocol libraries to take advantage of this.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-14 00:42:07 -07:00
James Cloos
da099f0d20 Revert “Dolt-ify"
Libtool’s is now sufficiently fast that DOLT is no longer
worth the bother, even on those few systems where is works.

This reverts commit 3e9afd501e
and part of commit d31e644c65.

It conflicted with commit f6a4fd0c76
which moved dolt from configure.ac to m4/dolt.m4.

And it addresses: http://bugs.freedesktop.org/show_bug.cgi?id=28188

Signed-off-by: James Cloos <cloos@jhcloos.com>
2010-09-13 05:27:41 -04:00
Alan Coopersmith
2661fbe6b8 XIM spec title page minor formatting cleanup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-09 19:24:29 -07:00
Jens Petersen
f99f1380bb Bug 29773: aliases for nb_NO.utf8 and nn_NO.utf8
<https://bugs.freedesktop.org/show_bug.cgi?id=29773>

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-09 19:23:02 -07:00
Alan Coopersmith
b15b8a558e Sun's copyrights are now owned by Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-03 23:11:53 -07:00
Alan Coopersmith
7742bf62b1 libX11 1.3.99.901 (1.4.0 RC1)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-03 18:31:44 -07:00