Commit Graph

369 Commits

Author SHA1 Message Date
Gaetan Nadon
885a333009 man: refactor common code in the man pages makefiles
Create a manpages.am makefile snippet in the root dir.
Each man page makefile includes manpages.am.

Now all man pages in xserver are generated the same way
using the same method as all of other xorg modules.
All ".man.pre" files in git are ".man" now.
Links are no longer created between different file types.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:11:10 -08:00
Gaetan Nadon
3f4c71799b XWin: build XWin man pages using XORG_MANPAGE_SECTIONS
Nothing requires the use of a C preprocessor
Using standard file extensions (.man) means no need for .gitignore
Use standard directory and makefile
Now can be built easily on any platform in the man directory

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-01-18 15:10:21 -08:00
Alan Coopersmith
03e8bfa1d1 Convert existing Xprintf style calls to asprintf style
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Adam Jackson
c4c4676e68 dix: Remove the backing store leftovers
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 13:46:08 -05:00
Adam Jackson
a80780a763 glx: Remove swap barrier and hyperpipe support
Never implemented in any open source driver.  The implementation
assumed explicit DDX driver knowledge of how the client-side driver
worked, since at the time the server's GL renderer was not a DRI driver.
But now, it is, so any implementation of these should be done with
additional DRI driver API, like the swap control extension.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 12:54:47 -05:00
Jon TURNEY
98abac809a Fix compilation after input API change
Fix compilation after commit 675f4a8525
converts winmouse.c to the new ValuatorMask input API, but doesn't
include the required header inpututil.h

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15 07:39:11 +10:00
Peter Hutterer
88cb61e1e5 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api
Conflicts:
	dix/getevents.c
	hw/xfree86/common/xf86Xinput.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 12:54:46 +10:00
Cyril Brulebois
68e4a628d6 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL) {
-   free(E);
- }
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:30:26 +10:00
Cyril Brulebois
99275ad2fa Remove superfluous if(p!=NULL) checks around free(p); p=NULL;
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
-  if (E != NULL) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
-  }
+ free(E);
+ E = NULL;

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:22:59 +10:00
Peter Hutterer
675f4a8525 Abstract valuator masks through a set of APIs.
This commit introduces an abstraction API for handling masked valuators. The
intent is that drivers just allocate a mask, set the data and pass the mask
to the server. The actual storage type of the mask is hidden from the
drivers.

The new calls for drivers are:
    valuator_mask_new()     /* to allocate a valuator mask */
    valuator_mask_zero()    /* to reset a mask to zero */
    valuator_mask_set()     /* to set a valuator value */

The new interface to the server is
    xf86PostMotionEventM()
    xf86PostButtonEventM()
    xf86PostKeyboardEventM()
    xf86PostProximityEventM()

all taking a mask instead of the valuator array.

The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to
memory allocation restrictions in SIGIO handlers.

For easier review, a lot of the code still uses separate valuator arrays.
This will be fixed in a later patch.

This patch was initially written by Chase Douglas.

Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
2010-10-22 11:02:48 +10:00
Jon TURNEY
25801a2556 Cygwin/X: Move duplicate extern variable declarations from various .c files to a new header file
For the global variables defined in winglobals.c, remove duplicate extern
declarations from the beginning of various .c files, and move most of them
into a new header file, winglobals.h

Leave some clipboard related variables alone for the moment, they need treating
more carefully, to avoid mixing client and server type definitions.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:02:00 +01:00
Jon TURNEY
04d11abcf2 Cygwin/X: Remove g_hwndKeyboardFocus
It's set but it's value is never used

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:58 +01:00
Jon TURNEY
5e896e425f Cygwin/X: Make g_hmodCommonControls static
Make g_hmodCommonControls static, it's only used in InitOutput.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:56 +01:00
Jon TURNEY
49b996faad Cygwin/X: Make g_hmodDirectDraw static
Add winReleaseDDProcAddresses() for releasing the direct draw module
handle, so g_hmodDirectDraw can be made static

Remove unneeded duplicate extern definitions of g_fpDirectDrawCreate
and g_fpDirectDrawCreateClipper, and move the definition from
winglobals.c to winengine.c

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:55 +01:00
Jon TURNEY
6f12277e37 Cygwin/X: Make g_hhookKeyboardLL static
Make g_hhookKeyboardLL static, it's only used in winkeyhook.c

Also remove unused externs

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:53 +01:00
Jon TURNEY
9952b51f68 Cygwin/X: Fix typos in comments
Fix a few typos in comments

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:51 +01:00
Jon TURNEY
1de5db73d3 Cygwin/X: Drop several unneeded includes of winprefs.h
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 15:01:50 +01:00
Colin Harrison
8e72310815 Xming: Remove uses of register keyword
I'm pretty sure the compiler has a better idea how to optimize this

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 15:01:48 +01:00
Colin Harrison
d11761c6a6 Xming: Casts to remove warnings on event pointers
winkeybd.c: In function ‘winSendKeyEvent’:
winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winMouseButtonsSendEvent’:
winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type
winmouse.c: In function ‘winEnqueueMotion’:
winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 15:01:19 +01:00
Colin Harrison
10bf8345cf Xming: Warning fix in winDeviceCursorCleanup()
return statement with an expression in a function whose return-type is void

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:42:16 +01:00
Jon TURNEY
cab837a60a Cygwin/X: Reformat the keyboard layout mapping table
Also remove the out-of-date listing of keyboard layout IDs and which ones
have known mappings

XXX: layout zh_TW doesn't exist anymore

This patch brought to you by C-u M-x align-regexp

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:41:40 +01:00
Jon TURNEY
ee2867649d Cygwin/X: Clarify XKB options in XWin man page
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:40:53 +01:00
Colin Harrison
1ba1b12d24 Xming: Warning fix in winApplyHints()
winmultiwindowwm.c: In function ‘winApplyHints’:
winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:38:32 +01:00
Colin Harrison
fb64414548 Xming: Fix warnings in ProcWindowsWMFrameSetTitle()
winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’:
winwindowswm.c:516: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness
winwindowswm.c:516: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness
winwindowswm.c:528: warning: pointer targets in passing argument 2 of ‘SetWindowTextA’ differ in signedness

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:38:30 +01:00
Colin Harrison
da5955cc02 Xming: Fix warnings in windialogs.c
windialogs.c: In function ‘winDisplayExitDialog’:
windialogs.c:327: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winDisplayAboutDialog’:
windialogs.c:597: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast
windialogs.c: In function ‘winAboutDlgProc’:
windialogs.c:697: warning: comparison between pointer and integer
windialogs.c:701: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘HINSTANCE’
windialogs.c:716: warning: assignment makes integer from pointer without a cast
windialogs.c:736: warning: assignment makes integer from pointer without a cast
windialogs.c:756: warning: assignment makes integer from pointer without a cast

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:35:38 +01:00
Colin Harrison
6d9fb07db2 Xming: Fix warnings in winNameCompare(), winNormalizeName()
winconfig.c: In function ‘winNameCompare’:
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:715: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:716: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:730: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c:731: warning: array subscript has type ‘char’
winconfig.c: In function ‘winNormalizeName’:
winconfig.c:1092: warning: array subscript has type ‘char’
winconfig.c:1093: warning: array subscript has type ‘char’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:28:28 +01:00
Colin Harrison
20510e5100 Xming: Fix warnings in winClipboardFlushXEvents()
winclipboardxevents.c: In function ‘winClipboardFlushXEvents’:
winclipboardxevents.c:225: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:266: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’
winclipboardxevents.c:619: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness
winclipboardxevents.c:659: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
winclipboardxevents.c:669: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:690: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness
winclipboardxevents.c:698: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:27:33 +01:00
Colin Harrison
44c8b449d2 Xming: Fix warning in winClipboardErrorHandler()
winclipboardthread.c: In function ‘winClipboardErrorHandler’:
winclipboardthread.c:444: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-19 14:26:19 +01:00
Jon TURNEY
1f2a57d9e4 Cygwin/X: Turn off the bad-function-cast warning for XWin code
Turn off the bad-function-cast warning for the XWin code, it's near impossible
to write code which uses Win32 API calls that doesn't trigger this warning

For example, SendMessage(WM_SETICON) returns an LRESULT, but we are supposed to
know this is safe to cast this result to a HICON, which gcc considers a non-matching
type.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:20:05 +01:00
Jon TURNEY
55e528b6cc Cygwin/X: Remove execute permission from source files
Remove execute permission from source files

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:19:29 +01:00
Jon TURNEY
b2b685e269 Cygwin/X: unifdef XFree86Server
Remove XFree86Server define, which was always on anyhow, and the
code which was guarded by !XFree86Server

This completes the process of removal started in 2006 :-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:17:21 +01:00
Jon TURNEY
9ed70f15ef Cygwin/X: Use normal apostrophe in XWin DDX help text
Use U+0027 APOSTROPHE in XWin DDX help text, rather than
U+2019 RIGHT SINGLE QUOTATION MARK

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:15:38 +01:00
Jon TURNEY
9f8f056a21 Cygwin/X: Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft
Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-10-19 14:02:33 +01:00
Peter Hutterer
eaf0b6a4d8 Merge branch 'master' into input-api
Conflicts:
	config/udev.c
	hw/xfree86/common/xf86Helper.c
	hw/xfree86/common/xf86Module.h
	hw/xfree86/common/xf86Xinput.h
	hw/xfree86/os-support/linux/lnx_init.c

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-10-15 13:46:59 +10:00
Adam Jackson
e418cd332c xwin: Remove some undue paranoia about UNDRAWABLE_WINDOW
mi will throw away rendering to input-only windows.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:21:27 -07:00
Adam Jackson
febf3e7ead dix: Remove the memory of the multibuffer extension
Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that
used them and it was killed in 0ba82562.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-10-13 09:18:41 -07:00
Jon TURNEY
72a9c686d7 Cygwin/X: Fix compilation after "delete pervasively use of DISPATCH_PROC"
commit cbd4d5dbb7
removes the static declarations of ProcWindowsWMDispatch and
SProcWindowsWMDispatch which precede their first use in
winWindowsWMExtensionInit()

Move winWindowsWMExtensionInit() to after the definition of those
two functions to fix compilation.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-29 12:15:11 -07:00
Tiago Vignatti
cbd4d5dbb7 xserver: delete pervasively use of DISPATCH_PROC
Some functions had to be moved around due some missing static definitions.
Another minor clean up like inexistent function declarations and etc were made
also.

Part of this patch was cooked using:
sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files`

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-09-28 16:45:05 +03:00
Jamey Sharp
2079853632 rootless: Delete dead remnants of rootless acceleration.
Jeremy deleted rootlessAccelInit's implementation in 2008 in commit
587c010a1c. Delete its prototype and the
remaining commented-out call to it.

It still makes sense for the rootless GC ops to relax the planemask, but
that's independent of the size of the operation, so quit checking the
thresholds there.

FillBytes and CompositePixels are not called anywhere, so delete
everything related to both.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
35ce892a70 rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-09-13 15:58:08 -07:00
Jamey Sharp
bbbf795e6b Delete redundant GC initializations.
When a GC is allocated, it is zeroed, including all storage requested
with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize
anything to zero.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2010-09-13 15:55:17 -07:00
Peter Hutterer
0fb7a5c261 input: Purge Register*Device() functions.
RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to
RegisterOtherDevice() and obsolete.

RegisterOtherDevice() was called for all devices and the two assignments can
simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and
pretend it never happened.

*lalalalala*

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-09-01 15:26:47 +10:00
Matt Turner
08adf41f63 Replace malloc/strlen/strcpy with strdup.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-08-27 19:05:48 -04:00
Jon TURNEY
fbd0204679 Cygwin/X: Fix glxWinCreateDrawable() for API change
Commit 9de0e31746 changed the signature
of __GLXScreen's createDrawable method.

Update the glxWinCreateDrawable() function in XWin's GLX provider
appropriately.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-10 09:29:39 -07:00
Peter Hutterer
fd4f5059f0 dix: purge leftover manual key down bit setting.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-07-07 13:29:46 +10:00
Colin Harrison
37734ba79c XWin: Fixes for devPrivates API change
Fix some typos in devPrivates API changes in XWin code.
Move allocation of private keys as it's no longer valid to do them during OsVendorInit()

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22 11:06:30 -07:00
Matt Turner
f4190feb25 Remove more superfluous if(p) checks around free(p)
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-06-11 19:05:46 +07:00
Mikhail Gusarov
eea286f2b9 xwin: Get rid of xstrdup when argument is definitely non-NULL
ditto for XWin

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-06-11 19:04:23 +07:00
Mikhail Gusarov
7287ef9e6c Remove unnecessary parentheses around return values in functions
This patch was generated by the following Perl code:

perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;'

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10 06:42:42 -07:00
Mikhail Gusarov
0a4d8cbdcd Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@

-if(E) { free(E); }
+free(E);

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06 20:27:18 +07:00