Age | Commit message (Collapse) | Author | Files | Lines |
|
Previous declaration required the use of a message + printf varargs. We
obviously want to allow the use of just a message.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Not including GenericEvents
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Walter Harms <wharms@bfs.de>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
__BUG_WARN_MSG is a simple helper to enable call with and without varargs. I
couldn't find a way to otherwise do this without getting gcc warnings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
There are plenty of cases that can only be triggered by a real bug in the
server and doing the ErrorF dance manually everywhere is a tad painful and
the error message is usually used only to find the spot in the file anyway.
Plus, reading BUG_WARN somewhere is a good indicator to the casual reader
that this isn't intended behaviour.
Note that this is intentionally different to the BUG_ON behaviour on the
kernel, we do not FatalError the server. It's just a warning + stacktrace.
If the bug is really fatal, call FatalError.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Since the check is for !(compilers that support __builtin_constant_p)
it needs to be !(gcc or new enough Sun cc), but was written as
!(gcc or too old Sun cc).
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Caused by commit 893e86a4, and hidden by the (char *) cast.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
|
|
compilers
1) The error attribute appeared in gcc-4.3
2) The return type of __builtin_constant_p is int
3) Sun Studio 12.0 and later builtin support for __builtin_constant_p
Found by Tinderbox.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
|
|
If the address of the swapped memory location is known at compile time,
we can check its alignment at no runtime cost and use lswapl instead.
text data bss dec hex filename
before: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg
after: 1864396 52136 78040 1994572 1e6f4c hw/xfree86/Xorg
bswap instructions: 131 -> 308 (used in lswapl)
rol instructions: 943 -> 1174 (used in lswaps)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Should be safe since cpswap isn't used on pointers.
text data bss dec hex filename
before: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg
after: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg
bswap instructions: 5 -> 131 (used in lswapl)
rol instructions: 811 -> 943 (used in lswaps)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
text data bss dec hex filename
before: 1875668 52136 78040 2005844 1e9b54 hw/xfree86/Xorg
after: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
The original macros are retained (instead of replacing them with inline
functions) because of implicit type promotion. That is, an int16 passed
to an inline function taking int32 would be implicitly promoted to int32
without a warning.
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
gcc generates better code with fabs() anyway.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Compare two version numbers in the major.minor form.
Switch the few users of manual version switching over to the new function.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
unsigned long is needlessly large on LP64. Use uint32_t instead.
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
|
|
Doesn't appear to be used anywhere.
Reviewed-by: Soren Sandmann <ssp@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Use the values from xproto rather than duplicating the effort
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
Move tokenize out of the parser, make it a dix util function instead.
Splitting a string into multiple substrings is useful by other places, so
let's use it across the line. Future users include config/hal, config/udev
and of course the parser.
Example usage:
char **substrings = xstrtokenize(my_string, "\n");
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
|
|
This patch adds the following three functions:
bits_to_bytes(bits) - the number of bytes needed to hold 'bits'
bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes'
pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than
'bytes'.
All three operations are common in protocol processing and currently the
server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set
of functions reduce the error rate of these (albeit simple) calculations and
improve readability of the code.
The functions do not check for overflow.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
With the Xtest virtual slave devices we have 4 devices for each MD
pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved
deviceids. It's quite easy to hit the current limit.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
|
|
|
|
|
|
This merge reverts Magnus' device coorindate scaling changes. MPX core event
generation is very different, so we can't scale in GetPointerEvents.
Conflicts:
Xi/opendev.c
dix/devices.c
dix/dixfonts.c
dix/getevents.c
dix/resource.c
dix/window.c
hw/xfree86/common/xf86Xinput.c
mi/mipointer.c
xkb/ddxBeep.c
xkb/ddxCtrls.c
xkb/ddxKeyClick.c
xkb/ddxList.c
xkb/ddxLoad.c
xkb/xkb.c
xkb/xkbAccessX.c
xkb/xkbEvents.c
xkb/xkbInit.c
xkb/xkbPrKeyEv.c
xkb/xkbUtils.c
|
|
|
|
Renaming those structs too.
Previously grabs were using a different struct than windows, which was
reasonably stupid.
|
|
Conflicts:
dix/devices.c
hw/xfree86/common/xf86Xinput.c
hw/xfree86/loader/xf86sym.c
mi/mieq.c
|
|
|
|
Add XGE handling in DeliverGrabbedEvent.
We can now grab something selecting XGE events, but the current code is a
bit messy and doesn't work too well yet.
|
|
|
|
Get rid of almost all uses of these definitions. They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build. As well as
for miinitext.c. But largely gone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|