Commit graph

114 commits

Author SHA1 Message Date
Alan Coopersmith
0e45f64766 Drop X_LOCALE fallback for OS'es without setlocale()
C89 or bust!   This was documented as being needed for "only Lynx,
Linux-libc5, OS/2" and has never been enabled in modular builds,
since none of those platforms have had anyone step up to add support
since the X11R7 conversion to autotools.

Mostly performed with unifdef -UX_LOCALE, followed by removal of files
left without any purpose, and manual cleanup of remaining references.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-22 22:02:17 -08: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
79594b4d66 localedb 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
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
a23f3323f2 XKB: provide adequate quotes for the license text
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 15:27:44 -04:00
Gaetan Nadon
a9c7a5cad9 XIM: refactor the multi licensing legal text
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 15:18:53 -04:00
Gaetan Nadon
c46f934ed8 xim trans: restore Fujitsu copyright legal text
Somehow lost during docbook conversion. text from x.org ftp R7.5.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 10:33:30 -04:00
Gaetan Nadon
3d75f99338 xtrans: restore X Consortium original legal text
Asking X Consortium permission to use The Open Group name makes no sense.
Even more so in 1994 before X Window System was passed on to the Open Group.

Using original text from xorg-docs/general/License

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 10:11:46 -04:00
Gaetan Nadon
136a381585 Framework: restore X Consortium copyright
Somewhat dammaged during docbook conversion.
Also restore pasrt of the original license text

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 10:03:21 -04:00
Gaetan Nadon
33f3468784 localedb: restore X Consortium original legal text
Asking X Consortium permission to use The Open Group name makes no sense.
Even more so in 1994 before X Window System was passed on to the Open Group.

Using original text from xorg-docs/general/License

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 09:50:00 -04:00
Gaetan Nadon
e99c9338e4 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-19 08:27:33 -04:00
Gaetan Nadon
b9dedc757e localedb: add release info to spec
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-19 08:26:20 -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
278ca8947c docs: merge copyright holder under the same copyright notice
As per the docbook markup dtd.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-17 09:44:46 -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
4a550c71b8 specs: remove orphan affiliation.
Authors affiliation are correct.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-14 15:55:42 -04:00
Gaetan Nadon
0cc02a6df6 specs: use appropriate markup for Copyright statements
Also move <releaseinfo> to match order of appearance

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-13 17:39:02 -04:00
Gaetan Nadon
afe13e19eb docs: use the &fullrelvers; entity to set X11 release information
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-12 20:38:12 -04:00
Gaetan Nadon
22a2153282 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 19:49:53 -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
7d5b718c1e docbook.am: embed css styles inside the HTML HEAD element
Rather than referring to the external xorg.css stylesheet, embed the content
of the file in the html output produced. This is accomplished by using
version 1.10 of xorg-xhtml.xsl.

This makes the whole html docs tree much more relocatable.
In addition, it eliminates xorg.css as a runtime file which makes
xorg-sgml-doctools a build time only package.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-09 14:46:39 -04:00
Gaetan Nadon
24632d2804 compose: upgrade makefile to support olinking on chunked html
The essential differences over the regular docbook.am are:
Adding root.filename parameter for naming of chapters html files.
Using xhtml xmlto format and xorg-chunk.xsl stylesheet
Set olink.base.uri for pdf but not for chunked html
Olink is not applicable to ps and txt formats.

Html chapters are added to shelf_DATA as they are also installed.
The xml is generated from a perl script and not distributed.

Requires version 1.10 of xorg-sgml-doctools.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-09-09 14:44:53 -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
Gaetan Nadon
18595f0d8f compose specs: generate chunked html
For large 600 page documents such as this one, chunked html
provide faster browser load time and better navigation.

Simply click on the locale of your choice in the toc and
the browser loads just that one file. Being a DocBook,
it benefits from all of the usual features and can be
integrated with the rest of the documentation.

Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-08-19 21:12:10 -04:00
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
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
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
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