Commit graph

885 commits

Author SHA1 Message Date
Gaetan Nadon
5cc8815b8a specs: build compose keys tables in specs/i18n/compose
Build the tables article together with the rest of the specs.
Make it transparent that the source in generated in nls.
Reuse docbook.am and get all the features such as olink.

The docbook article file stem and id must be the same. The new name
for the main article is libX11-keys. The new installation location
is $docdir/libX11/i18n/compose.

The nls dir retains the role of generating the DocBook/XML source
but does not build neither installs output formats or generated source.

The tables article now has to specify that each included locale
section is a dependency. It did not matter before as they were web links.

The xorg-sgml-doctools masterdb shall be updated to include this new doc.
Install location moved from doc/libX11/Compose to doc/libX11/i18n/compose.

Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-05 12:36:03 -04:00
Gaetan Nadon
adebbe3856 nls: restructure charts as a single article with sections
Looks more like a real article with a toc rather than individual
web pages. Looks nicer in pdf.

Each locale is a "section" rather than an "article".
Using XInclude to aggregate xml source files gets you the toc for free.

The single document is over 600 pages while there were 62 separate
documents previously. FOP version 1.0 is required to handle missing
character like capital sharp s.

Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-05 12:36:03 -04:00
Alan Coopersmith
fc74dc12b1 libX11 1.4.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-07-28 19:32:40 -07:00
Matt Dew
ab1f302317 Add id attributes to error codes to allow linking from other docs.
Signed-off-by: Matt Dew <marcoz@osource.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
2011-07-17 10:28:42 -06:00
David Coppa
5c831fef40 Fix libpthread linkage on OpenBSD.
OpenBSD prefers to use the -pthread to fetch pthread libs when needed.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-07-14 14:04:27 +02:00
Gaetan Nadon
445b0b3efc config: use XORG_WITH_PERL macro to replace custom program check
New in version util-macros 1.15, the macro does the usual checking
for program path and provides an interface for makefile variables.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-28 11:29:12 -04:00
Gaetan Nadon
47d99a324d config: update XORG_WITH_FOP macro usage
A new feature to test for a minimum version has been added.

The parameter position changed. Due to limited usage
and requiring 1.15, it turns out to be backward compatible.

There is no functional change to how docs are build.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-28 11:24:52 -04:00
Gaetan Nadon
e659683ad5 Remove unused xmlrules.in in specs, now in /nls
The specs dir has been converted to docbook.am

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-22 20:32:10 -04:00
Gaetan Nadon
9992092609 nls: move xmlrules.in from specs to nls
It is no longer used in the specs dir.
Remove html from CLEANFILES as it breaks. Make do not clean directories
Remove SUFFIXES as pattern rules are used rather than suffix rules.

Other improvements are possible, the first priority is to move it out
of the specs dir.

Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-15 22:12:39 -04:00
Gaetan Nadon
b370eeb019 Install target dbs alongside generated documents
This matches a change in xorg-sgml-docs whereby the masterdb will look for
the target dbs into the same location as the generated documents.

The target dbs are now installed alongside the generated documents.
Previously they are installed in $prefix/sgml/X11/dbs alongside masterdb which
has the potential of installing outside the package prefix and cause
distcheck to fail when user does not have write permission in this package.

Requires XORG_CHECK_SGML_DOCTOOLS(1.8) which was released 2011-06-11
2011-06-11 19:49:23 -04:00
Alan Coopersmith
4e741654b7 specs/libX11: Turn appendix references into links
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-07 18:41:30 -07:00
Alan Coopersmith
a3d1152bc4 specs/libX11: Turn chapter references into links
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-07 18:37:41 -07:00
Alan Coopersmith
d0cc949dfe specs/libX11: Turn many "see section ..." into links
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-07 00:52:32 -07:00
Alan Coopersmith
02d4c08dea specs/libX11: Convert some header filenames to filename tags
perl -i -p -e 's{^&lt;(.*\.h)&gt;\ *}{<filename class="headerfile">&lt;\1&gt;</filename>}' *.xml

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-06-05 22:50:37 -07:00
Matt Dew
c51a011329 Add id attributes to funcsynopsis to allow other docs to olink to them.
Signed-off-by: Matt Dew <marcoz@osource.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-06-04 09:46:57 -06:00
Alan Coopersmith
6841260c8b Bug 37624 - parameter x is missing from synopsis of XDrawString in libX11.html
https://bugs.freedesktop.org/show_bug.cgi?id=37624

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-27 20:14:36 -07:00
Matt Dew
205af6a4e5 Add id's to functions, to make clickable links.
Signed-off-by: Matt Dew <marcoz@osource.org>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-05-24 12:42:43 -06:00
Alan Coopersmith
5c06bc5944 libX11 spec: fix monospaced column alignment after deligaturization
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-20 15:38:08 -07:00
James Cloos
ef0019c714 Expand latin ligatures out to their NFKC equivalents.
Ligatures should be done by the typesetting system.
Manuscripts should not bother with them.

Signed-off-by: James Cloos <cloos@jhcloos.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2011-05-20 17:37:44 -04:00
Daniel Stone
761b8aa0c9 XCB: Add more friendly error messages for common asserts
This patch adds more friendly error messages for three common classes of
assertion:
    - missed sequence numbers due to being griefed by another thread
    - unknown requests in queue due to being griefed by another thread
    - extensions dequeuing too much or too little reply data

It adds error messages offering advice (e.g. call XInitThreads() first)
on stderr, but still generates actual assertions.  Hopefully this means
it's a little more Googleable and a little less frightening.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-20 17:45:18 +01:00
Gaetan Nadon
159bf29247 Remove misplaced hyphens in libX11 DocBook/XML #37364
Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-05-20 11:21:36 -04:00
Alan Coopersmith
0ee6d8247d Fix man page and comment references to use XFreeModifiermap (lowercase map)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-17 20:49:59 -07:00
Alan Coopersmith
3275ec4ca8 XKB man pages: Fix coordinantes typo in multiple pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-17 20:30:54 -07:00
Alan Coopersmith
ca33a80606 DisplayOfCCC.man: Fix typo "ClientWhitePointOfCC" -> "ClientWhitePointOfCCC"
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-05-17 16:27:32 -07:00
Jeremy Huddleston
ae39d82b01 Silence clang static analysis warnings for SetReqLen
This provides a simplified version of the SetReqLen macro when using clang for
static analysis.  Prior to this change, we would see many Idempotent operation
warnings inside this macro due to the common case of calling with arg2 and
arg3 being the same variable.  This has no effect on code produced during
compilation, but it silences a number of false positives in static analysis.

XIPassiveGrab.c:170:5: warning: Assigned value is always the same as the existing value
    SetReqLen(req, num_modifiers, num_modifiers);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from XIPassiveGrab.c:26:
.../include/X11/Xlibint.h:580:8: note: instantiated from:
            n = badlen; \
              ^

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-08 09:08:07 -07:00
Jeremy Huddleston
130af2bc02 XKB: XkbComputeSectionBounds: Check correct bounds in default switch-case
XKBGeom.c:191:25: warning: Access to field 'x1' results in a dereference of a null pointer (loaded from variable 'rbounds')
        _XkbCheckBounds(bounds,rbounds->x1,rbounds->y1);
                               ^~~~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-05-04 15:37:36 -07:00
Jeremy Huddleston
c987ef04be Revert "XKB: Avoid a possible NULL dereference"
Sorry for the noise.  I accidentally pushed and didn't mean to. =(

This reverts commit 4024091678.
2011-05-04 15:31:17 -07:00
Jeremy Huddleston
46d04bc4e7 Dead code removal
XKBGeom.c:118:27: warning: Assigned value is always the same as the existing value
    for (key=row->keys,pos=k=0;k<row->num_keys;k++,key++) {
                       ~~~^~~~
XKBGeom.c:115:5: warning: Value stored to 'pos' is never read
    pos= 0;
    ^    ~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-04 11:35:31 -07:00
Jeremy Huddleston
4024091678 XKB: Avoid a possible NULL dereference
XKBGeom.c:191:25: warning: Access to field 'x1' results in a dereference of a null pointer (loaded from variable 'rbounds')
        _XkbCheckBounds(bounds,rbounds->x1,rbounds->y1);
                               ^~~~~~~

Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-04 11:34:53 -07:00
Jeremy Huddleston
626e5e34be Annotate _XIOError as _X_NORETURN
Found-by: clang static analyzer
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-04 11:21:41 -07:00
Jeremy Huddleston
d3d7896408 clang analyzer: Don't warn about Xmalloc(0)
This will prevent a number of false positives in where clang's
static analysis reports about calls to malloc(0).

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-05-03 09:32:53 -07:00
Alan Coopersmith
393921cf21 Delete special case code to append "/sparcv9" to i18n module path
Was triggered by defined(__sparcv9) so only built on Solaris SPARC 64-bit.
Inconsistent with all other platforms, and a bit overcomplicated.

Should anyone need to continue using that path, simply build with
a #define POSTLOCALELIBDIR "sparcv9" to get the same result.

Fixes Solaris bug 7038737:
 sparcv9 Xlib looking in wrong path for i18n loadable modules

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2011-04-22 13:52:27 -07:00
Alan Coopersmith
b9ff9cfd5c specs/libX11: Fix XOpenDisplay() prototype in chapter 2 [bug 36244]
Was incorrectly showing AllPlanes() instead when describing XOpenDisplay()

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

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-18 17:49:23 -07:00
Alan Coopersmith
b850adbdeb Convert malloc(strlen()); strcpy() sets to strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:18 -07:00
Alan Coopersmith
09194042d3 Replace Xmalloc+bzero pairs with Xcalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:13 -07:00
Ander Conselvan de Oliveira
ac1e2bff71 om: Fix memory leaks on get_font_name error paths.
While at it, remove unneeded check for NULL before Xfree.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:06:00 +03:00
Ander Conselvan de Oliveira
7c362e275c xcms: Fix memory leaks on LINEAR_RGB_InitSCCData error path.
pScreenData is replaced when building per visual intensity tables. If
malloc failed the old value of pScreenData (stored also in
pScreenDefaultData) was being leaked. Also, property_return wasn't
free'd in that case.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:06:00 +03:00
Ander Conselvan de Oliveira
5c810e2ac2 xcms: Fix error on LINEAR_RGB_InitSCCData error path.
Due to what looks like a copy & paste error, pScreenData->pBlueTbl would
be accessed after being free'd.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:06:00 +03:00
Ander Conselvan de Oliveira
d749948f94 om: Fix potential memory leak in init_om.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
d0749d6abd om: Fix memory leak on read_EncodingInfo error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
4b2e8d00f5 Fix memory leaks on _XimCbDispatch error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
46e6c78b1a Fix memory leak on _XimCommitRecv error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
0ace642a2d Fix memory leaks on _XimWriteCachedDefaultTree error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
e29be94edb Fix memory leaks on _XimGetAttributeID error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
d144a50512 Fix memory leaks on _XimProtoCreateIC error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
6a452f7a98 Fix leaks in _XimEncodingNegotiation error paths.
name_ptr and detail_ptr weren't free'd in some cases before returning
False.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
396e5a452a FSWrap: fix potential leak in copy_string_list
If list_count is 0, dst would be allocated and leaked.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
1a94426018 Fix memory leak with broken bitmap files in XReadBitmapFileData
Bitmap file data is read looping through the lines in the input file. If
there is extra data after the bitmap, these lines will be processed and
if this data represents another bitmap it will replace the one read
before causing the memory allocated for bits to leak.

This changes the code to stop processing the file once a bitmap was
read.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Alan Coopersmith
c1c91e9a22 Fix "attrinute" typo in comments in ximcp
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-12 20:50:42 -07:00
Alan Coopersmith
7103b83a88 Make doc install subdirectories more like the pre-docbook.am paths
Haven't restored the "specs" path in the install path, but have restored
libX11 & i18n subdirectories in the path for better logical grouping.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2011-04-12 18:18:39 -07:00