Commit graph

1207 commits

Author SHA1 Message Date
Alan Coopersmith
33bef06568 specs/XKB: Markup NULL as <symbol> instead of <emphasis>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:55 -07:00
Alan Coopersmith
f10aa1e094 specs/XKB: Markup function args as <parameter> instead of <emphasis>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:55 -07:00
Alan Coopersmith
79ba58cceb specs/XKB: Convert remaining error names to errorname tags
Most were caught by applying libX11 lists, but BadKeyboard & XKB*_Bad*
are XKB-specific.   (Plus some were badly split across tag boundaries.)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:55 -07:00
Alan Coopersmith
42b2f5388c specs/XKB: manually fixup some more emphasis tagging mismatches
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:55 -07:00
Alan Coopersmith
3b2f47d44a specs/XKB: re-normalize <emphasis> layout in xml files
Same script as before, just with <!-- xref --> comments out of the way
now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:54 -07:00
Alan Coopersmith
ce95f152ed specs/XKB: Remove remaining xref comments
All the places marked by these have been turned into the appropriate
link, xref, or olink tags now.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:54 -07:00
Alan Coopersmith
6590b66e19 specs/XKB: make olinks to xkbproto for references in section 10.13
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:54 -07:00
Alan Coopersmith
fcda446877 specs/XKB: Add <figure> tags and make Figure references link to them
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:53 -07:00
Alan Coopersmith
087a233847 specs/XKB: Turn Table references into links
Adds id attributes to all table tags so we can link to them

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:53 -07:00
Alan Coopersmith
135fa07b74 specs/XKB: Turn section references into xref links
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:53 -07:00
Alan Coopersmith
53e931d799 specs/XKB: Turn Chapter references into xref links
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:53 -07:00
Alan Coopersmith
b7f00ce5bc specs/XKB: Apply <emphasis> to semantic tag transformations from Xlib spec
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:53 -07:00
Alan Coopersmith
b00a7ddff2 specs/XKB: Markup function names as <function> instead of <emphasis>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:52 -07:00
Alan Coopersmith
bfbb58b767 specs/XKB: normalize <emphasis> layout in xml files
- Stop placing <emphasis> on empty space, commas, and periods.
- Move periods & commas after closing </emphasis> tag
- move <emphasis> open & close tags to same line, instead of mirroring
  nroff layout.

Simplifies automating further transformations of these tags.

Performed via:
 perl -i -0 -p \
    -e 's{<emphasis>(\s*)</emphasis>}{}msg;' \
    -e 's{<emphasis>([\s\.,]*)</emphasis>\s*}{\1}msg;' \
    -e 's{\n([\.,])\s*}{\1\n}msg;' \
    -e 's{([^\.])([\.,])\s*</emphasis>}{\1</emphasis>\2}msg;' \
    -e 's{\s*<emphasis>\n\s*}{\n<emphasis>}msg;' *xml

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:51 -07:00
Alan Coopersmith
b16ee69a01 specs/XKB: Convert to funcsynopsis+variablelist instead of informaltable
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 13:56:16 -07:00
Alan Coopersmith
b41d43d4cf specs/XKB: Add index
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-19 00:10:25 -07:00
Alan Coopersmith
72ae1d793b specs/XKB: Fix various markup issues in functiondecl tables
- Merge some functionargdecl entries incorrectly split across rows
- Add missing parameter name markup to some functionargdecls
- Add missing function prototype markup to a functiondecl
- Remove stray emphasis tags in a functiondecl

Allows them to correctly convert to funcsynopsis markup in next step.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-18 22:56:40 -07:00
Alan Coopersmith
9fdb973012 specs/XKB: Convert header filenames to filename tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-18 22:56:40 -07: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
7ce2b0f12a Use C99 named initializers to fill in events passed to XSendEvent
Forces compiler to zero-fill unset fields in the struct (fixing bug 81236)
and allows optimizer to order field initialization to best fit cache layout
or other considerations.

Before & after output of gcc -S on AMD64 shows insertion of "rep stosq"
instructions to rapidly zero-fill structs.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2014-07-18 22:56:23 -07:00
Alan Coopersmith
169805e1dc Fix validation of ctrls parameter to XkbGetPerClientControls()
Nothing in the XKB spec states that the memory pointed to by ctrls has to
be initialized to any given value when passed to the function, only that
it is set by the function to the values returned by the X server:
http://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#The_Miscellaneous_Per_client_Controls

The check for the incoming value seems to be copied from
XkbSetPerClientControls without explanation.

Instead change it to checking if ctrls is non-NULL, since there's no
point asking the X server to return a value the caller won't even see.

Found while investigating report from cppcheck-1.65:
[src/xkb/XKB.c:699] -> [src/xkb/XKB.c:719]: (warning) Possible null pointer
 dereference: ctrls - otherwise it is redundant to check it against null.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-18 22:56:23 -07:00
Alan Coopersmith
1e362fac92 Fix map->num_types check in XkbAddKeyType()
Check is intended to ensure we allocate at least XkbNumRequiredTypes
in map, but was accidentally marked with a ! causing the wrong check.

Reported-by: Harms <wharms@bfs,de>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-18 22:56:19 -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
walter harms
aa8bda0db2 lcDefConv.c: fix use before check
* Do not use variables before checked for NULL.
* remove some superfluid spaces (Mark Kettenis)

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-07-06 10:12:20 -07:00
Alan Coopersmith
c0670e5d3a Start adding Unicode 7.0 support to compose table
New characters defined in http://www.unicode.org/charts/PDF/U1F300.pdf

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-18 22:03:13 -07:00
walter harms
a4679baaa1 rm redundant null checks
remove more redundant NULL checks
note that _XkbFree() is really Xfree()

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-18 08:27:33 +10:00
walter harms
602d7f5030 libX11: rm redundante NULL checks
This patch removes the last remaining  NULL checks for Xfree()

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-06-17 10:54:16 +10:00
walter harms
d81fed4614 Remove more redundant null checks before Xfree()
Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:24:39 -07:00
walter harms
0b7fd7dbec Remove redundant null checks before free
This patch removes some redundant null checks before free.
It should not change the code otherwise. Be aware that this
is only the first series.

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:16:40 -07:00
walter harms
7d452fad50 libX11/lcUTF8.c fix: dereferenced before check
* Do not use variables before checked for NULL.

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:05:58 -07:00
walter harms
a3808f5151 libX11/XKBNames.c fix: dereferenced before check
* Do not use variables before checked for NULL.

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:05:58 -07:00
walter harms
b3c9f6a17e libX11/lcGenConv.c fix: dereferenced before check
* Do not use variables before checked for NULL.

Signed-off-by: Harms <wharms@bfs,de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-06-06 17:05:55 -07:00
Andreas Schwab
c6bc28d433 Restore lost tabs in sed commands
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-23 17:27:10 -07:00
Benno Schulenberg
e3dc0d1733 nls: Transform Brazilian compose file to an include plus three overrides.
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-21 10:05:14 -04:00
Benno Schulenberg
16c87dda4d nls: Adding the missing compose sequences with <comma> for O with ogonek.
All other vowels with ogoneks can already be composed using <comma>.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-21 10:05:14 -04:00
Benno Schulenberg
655b60f483 nls: Adding the missing postfix sequences for composing vowels with ogoneks.
It existed for lowercase i, but not for uppercase I nor the other vowels.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-21 10:05:14 -04:00
Owen W. Taylor
7f8f9a36ef Fix XNextRequest() after direct usage of XCB
When XCB owns the X socket, dpy->request is not updated, so
NextRequest() and XNextRequest() return the wrong value. There's
nothing we can do to fix NextRequest() while retaining ABI compat,
but change XNextRequest() to grab the socket back from XCB,
updating dpy->request.

Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-20 21:33:24 -07:00
Alan Coopersmith
0f9e734ea9 Add missing .TE tags to end tables in Xkb man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-20 21:30:57 -07:00
Alan Coopersmith
280274e529 XCreateGC.man: simplify table to work with Solaris tbl
Having every table cell be a text diversion (T{...T}) was too much for
Solaris tbl to handle, and thus "man XCreateGC" would print the error
/usr/man/man3x11/XCreateGC.3x11: line 402: Too many text block diversions
tbl quits
and not display the table of mask bits or any text in the man page after
that table.   Since the #define column doesn't need special handling,
making it not use text diversions brings the table under the tbl limit.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-05-20 21:30:57 -07:00
James Cloos
93bb325a54 Revert "nls: Adding compose sequences (with <parenleft> first) that GTK also has."
Parenleft is already in use for sequences of the form <(> <letter> <)>
to generate circled letters.

Eg, <Multikey> <parenleft> <a> <parenright> generates ⓐ.

This reverts commit f020235f4b.

Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-20 17:30:10 -04:00
Benno Schulenberg
060707851b nls: Adding accessible compose sequences for Ș and Ț (with comma below).
Compose sequences with <dead_belowcomma> exist, but very few keyboard
layouts contain that symbol.  So a more usual character is needed to be
able to easily compose Ș, ș, Ț and ț.  The semicolon is normally only
used for composing letters with ogoneks -- but only vowels take ogoneks,
so the character is free for consonants, and thus <semicolon> is used
here to compose commas below.  It is somewhat fitting, because on most
Romanian keyboards the Ș is placed on that key, and the Ț next to it.

(Oh -- the more obvious sequences with <comma> were already taken for
composing S and T with cedillas.)

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-20 17:22:19 -04:00
Benno Schulenberg
ca435c2f75 nls: Ordering some compose sequences in a more customary way.
The custom seems to be: pairing the ones that have only the sequence of
two keys reversed, and putting the one with the diacritic first first.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-20 15:07:43 -04:00
Benno Schulenberg
f020235f4b nls: Adding compose sequences (with <parenleft> first) that GTK also has.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-20 15:07:33 -04:00
Benno Schulenberg
bda0b3b5bd nls: Allowing Romanian Ă and ă to be composed also with lowercase <u>.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2014-05-20 15:06:57 -04:00
Alan Coopersmith
8be4610939 Fix "follwing" typo in en_US.UTF-8/Compose comment
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-03-13 23:22:48 -07:00
Reuben Thomas
6f30e9034f en_US.UTF-8/Compose: Fix apparent copy-paste-o, changing capital to small A.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-03-13 23:07:35 -07:00
Peter Hutterer
d6bd988bc0 man: fix man page for XkbGetMap
Returned structure must be freed with XkbFreeKeyboard().

Reported-by: Morten Bøgeskov <mb@dbc.dk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-03-03 12:41:08 +10:00