Commit graph

89 commits

Author SHA1 Message Date
Alan Coopersmith
8b77c86a06 Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/287>
2025-08-02 18:38:26 -07:00
Po Lu
1294bfa487 specs: document change in XIMPreeditCallbacks
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-11-03 14:47:19 -07:00
Alan Coopersmith
2b7598221d Fix spelling/wording issues
Found by using:
    codespell --builtin clear,rare,usage,informal,code,names

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-22 15:19:58 -07:00
Alan Coopersmith
d7e22252d6 Remove documentation of obsolete B16 & B32 tags in specs/libX11
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-10 13:30:47 -08:00
Alan Coopersmith
663f47075f specs/libX11: Update Portability Considerations for the 21st century
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-03 08:50:52 +10:00
Alan Coopersmith
28f4b989b5 specs/libX11: Fix broken synopsis for Data/Data16/Data32
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 20:39:53 -08:00
Alan Coopersmith
382561951e specs/libX11: Add missing parameter types for XGetWindowProperty()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 20:31:54 -08:00
Alan Coopersmith
2beaecdb66 specs/libX11: Make paramdef spacing more consistent
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 20:20:32 -08:00
Alan Coopersmith
4c436c6c14 specs/libX11: Fix paramdef entries listing multiple parameters
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 20:13:29 -08:00
Alan Coopersmith
1728b1a8a4 specs/libX11: More synopsis fixes
Mostly transforming macro definitions and functions taking void arguments
from undecorated <para> tags to use <funcsynopsis> tags to get decorations.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 19:46:31 -08:00
Lucien Gentis
f0dc83db7e Typos in "Xlib - C Language X Interface" document - Chapter 02
This patch fixes typos and lack of tags in "Xlib - C Language X Interface" document - Chapter 02.

Signed-off-by: Lucien Gentis <lucien.gentis@waika9.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-01 17:11:02 -08:00
Matthew D. Fuller
83adf3d1e3 Fixup param specification for XChangeProperty()
Signed-off-by: Matthew D. Fuller <fullermd@over-yonder.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-06-06 09:44:18 +10:00
Alan Coopersmith
5525e8433f specs/libX11: disengender a user reference
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-18 22:56:40 -07:00
Alan Coopersmith
d8679eae93 specs/libX11: Correct value of IconicState to match Xutil.h
Xutil.h has always had a value of 3 for IconicState, since 2 was
previously used for the long-obsolete ZoomState, so make the spec
match what programs have used for decades.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2014-07-18 22:56:34 -07:00
Alan Coopersmith
ff9a5c1992 specs/libX11: Add missing spaces to 'unsignedint' & 'unsignedlong' types
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-06 15:59:19 -07:00
Alan Coopersmith
a06ea86773 specs/libX11: Fix height & width in parameter lists to be two separate entries
"unsigned int width, unsigned int height", not a single parameter "height"
of type "unsignedintwidth,".

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-06 15:59:19 -07:00
Alan Coopersmith
e4db5e5036 specs/libX11: Fix x & y in parameter lists to be two separate parameters
"int x, int y" not a single parameter y of type "intx"

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-06 15:59:19 -07:00
Kees Cook
54540d7cba libX11: check size of GetReqExtra after XFlush
Two users of GetReqExtra pass arbitrarily sized allocations from the
caller (ModMap and Host). Adjust _XGetRequest() (called by the GetReqExtra
macro) to double-check the requested length and invalidate "req" when
this happens. Users of GetReqExtra passing lengths greater than the Xlib
buffer size (normally 16K) must check "req" and fail gracefully instead
of crashing.

Any callers of GetReqExtra that do not check "req" for NULL
will experience this change, in the pathological case, as a NULL
dereference instead of a buffer overflow. This is an improvement, but
the documentation for GetReqExtra has been updated to reflect the need
to check the value of "req" after the call.

Bug that manifested the problem:
https://bugs.launchpad.net/ubuntu/+source/x11-xserver-utils/+bug/792628

Signed-off-by: Kees Cook <kees@outflux.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-07-22 23:51:38 -07:00
Alan Coopersmith
9dfb0f3c0a troff macro expansion in specs/libX11
Many of the custom nroff macros (.ds <macro> <contents>) were left
unsubstituted in the nroff->docbook conversion.   This substitution
is now performed, via the following perl script:

#! /usr/bin/perl -w -i

use Text::Wrap;

while ($_ = <>) {
    while ($_ =~ m/\((\w+)\b/g) {
        my $m = $1;
        if (exists $macro{$m}) {
            $_ =~ s/\($m/$macro{$m}/;
            $_ = wrap('', '', $_);
            $_ =~ s/[ \t]+$//;
        }
    }

    if ($_ =~ /\<!-- .ds (\w+) (.*) -->/) {
        my ($m, $s) = ($1, $2);
        $macro{$m} = $s;
        while ($macro{$m} =~ /\\\s*$/) {
            $macro{$m} =~ s/\\\s*$//ms;
            $macro{$m} .= <>;
            chomp($macro{$m});
        }
        $macro{$m} =~ s/\\ / /g;
    } else {
        print $_;
    }
}

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-07 20:12:25 -07:00
Alan Coopersmith
20c17bd9eb specs/libX11: correct prototype for XListPixmapFormats/XImageByteOrder
The XListPixmapFormats arguments was being shown with XImageByteOrder's
name and return types.   Appears to have been a glitch in the nroff ->
docbook conversion.

Reported-by: ZHANG Zhaolong <zhangzl2013@126.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-07 20:12:02 -07:00
Alan Coopersmith
dce84b8c39 libX11 spec: Correct prototype for XConvertSelection
selection & target parameters were accidentally run together

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-06-06 13:31:19 -07:00
Alan Coopersmith
b64969f0e5 Add X11R7 sections to the libX11 & XKBlib credits to cover Docbook conversion
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-17 18:17:53 -07:00
Alan Coopersmith
9ea611696f Add olinks from libX11 & localedb specs to ICCCM spec
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-17 18:01:36 -07:00
Alan Coopersmith
b3c1b8cdab Add olinks from libX11 spec to ICCCM spec
Also convert ICCCM title mentions from <emphasis> to <citetitle>

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-17 17:49:50 -07:00
Alan Coopersmith
ebebb65e75 libX11 AppC: Fix section headers that didn't translate from nroff properly
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-17 09:20:13 -07:00
Alan Coopersmith
d5ab4ae0e7 Add olinks from libX11 spec to x11protocol spec
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-04-17 09:20:06 -07:00
Alan Coopersmith
83878a0e34 libX11 spec: Remove .br nroff macro left behind in XGetWindowProperty prototype
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-04-14 22:28:53 -07:00
Matt Dew
cadcbd376f informaltable & table cleanup
On certain tables, add top and bottom borders to table header
and a bottom border to the table. This matches what those
tables in the old pdfs looked like.

the <?dbfo keep-together='always'> prevents tables from
splitting across pages. Useful for tiny tables.

Converting the colwidth to a floating point, IE, 1* -> 1.0*
cleans up these build errors:
WARNING: table-layout="fixed" and column-width unspecified =>
falling back to proportional-column-width(1)

Signed-off-by: Matt Dew <marcoz@osource.org>
2012-01-21 17:59:51 -07:00
Matt Dew
22ba43d198 Cleanup IDs and links in doc
1 - fix the capitalization of the ID attributes to match either the
     <title> or <funcdef> string it goes with.
2 - fix any <linkend>'s that were affected by 1.
3 - any <function> in the docs that has an actual funcdef,
will become an olink.

Signed-off-by: Matt Dew <marcoz@osource.org>
2011-10-07 22:52:30 -06:00
Gaetan Nadon
154430268c libX11 specs: use <copyright> for first holder of multi license
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-20 16:08:21 -04:00
Gaetan Nadon
4519c89a87 specs: fix The Open Group license text
The warranty referred to the X Consortium

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 08:05:32 -04:00
Gaetan Nadon
08ac378423 specs: The strandard name is still "X Consortium Standard"
This spec, and fsproto spec, are the only two docs with a different
standard name.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 08:03:39 -04:00
Gaetan Nadon
8dfbeb1b1b specs: support multi licensed copyright notice and license text
For documentation having multiple licenses, the copyright and legalnotice
elements sequence cannot instantiated multiple times.
The copyright notice and license text are therefore coded inside a legalnotice
element. The role attribute on the paragraph is used to allow styling of the
copyright notice text which should not be italicized.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-18 13:22:34 -04:00
Gaetan Nadon
7ff012bb43 specs: handle multiple sets of copyright notice/license/warranty
Docbook groups all the <copyright> elements together and all the
<legalnotice> elements together.

We cannot have a sequence:
<copyright> <legalnotice> <copyright> <legalnotice> [...]

A workaround, which was done in some documents, is to put the copyright
notice inside the legalnotice in plain text without the <copyright> element.
A formal paragraph title is added here which makes the copyright notice bold,
and makes it much easier to locate.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-17 09:44:01 -04:00
Gaetan Nadon
719f16570d docs: use the &fullrelvers; entity to set X11 release information
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-11 17:46:59 -04:00
Gaetan Nadon
a6b2992f50 docs: remove orphan <affiliation>
Somehow created during the conversion from roff. Unable to locate
the author to which it belongs.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-11 17:38:42 -04:00
Gaetan Nadon
c7420060b6 docs: remove <productnumber> which is not used by default
This element is not rendered by default on the title. A template
customization is required to display it.
X Window System does not have a product number.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-11 17:38:05 -04:00
Gaetan Nadon
7f23c72c94 libX11 specs: review doclifter generated tables
Many tables had a questionnable layout and some had information dropped.
Each table was cross-referenced with a pre-docbook version
to ensure semantic integrity.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-19 21:16:01 -04:00
Gaetan Nadon
1efdbeb8cd credits.xml: remove toc from Acknowledgments
There should be no toc for a simple preface with only one
Acknowledgments section.

Use <simplesect> markup rather than sect1.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-19 21:16:01 -04:00
Gaetan Nadon
77cc17ed08 libX11 specs: move </para> above <varaiablelist>
Many, but not all, function synopsis have a paragraph that
nests the variable list. The code was generated by doclifter
and there is no apprent reasons as to why it was done this way.
Found while investigating a spacing issue.

Before the patch:
<para>Some blurb about the function
<funcsynopsis>
</funcsynopsis>
<variablelist>
</variablelist>
</para>

After the patch:
<para>Some blurb about the function</para>
<funcsynopsis>
</funcsynopsis>
<variablelist>
</variablelist>

There are no noticable differences when reading the doc
other than than the removed few pixels of spacing between
the function sysnopsis and the variable list block.

In some cases, there are no "blurb about the fucntion"
and the empty paragraph is removed.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-19 21:16:01 -04: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
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
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
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