diff options
author | Keith Packard <keithp@keithp.com> | 2012-03-21 12:55:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-03-21 13:54:42 -0700 |
commit | 9838b7032ea9792bec21af424c53c07078636d21 (patch) | |
tree | b72d0827dac50f0f3b8eab29b3b7639546d735d7 /hw/xwin/winglobals.c | |
parent | 75199129c603fc8567185ac31866c9518193cb78 (diff) |
Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:
-bap
-psl
-T PrivatePtr
-T pmWait
-T _XFUNCPROTOBEGIN
-T _XFUNCPROTOEND
-T _X_EXPORT
The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.
The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.
The comparison was done with this script:
dir1=$1
dir2=$2
for dir in $dir1 $dir2; do
(cd $dir && find . -name '*.o' | while read file; do
dir=`dirname $file`
base=`basename $file .o`
dump=$dir/$base.dump
objdump -d $file > $dump
done)
done
find $dir1 -name '*.dump' | while read dump; do
otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
diff -u $dump $otherdump
done
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'hw/xwin/winglobals.c')
-rw-r--r-- | hw/xwin/winglobals.c | 96 |
1 files changed, 47 insertions, 49 deletions
diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index 655cdb131..4953bd0cf 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -35,88 +35,86 @@ #endif #include "win.h" - /* * General global variables */ -int g_iNumScreens = 0; -winScreenInfo * g_ScreenInfo = 0; +int g_iNumScreens = 0; +winScreenInfo *g_ScreenInfo = 0; + #ifdef HAS_DEVWINDOWS -int g_fdMessageQueue = WIN_FD_INVALID; +int g_fdMessageQueue = WIN_FD_INVALID; #endif DevPrivateKeyRec g_iScreenPrivateKeyRec; DevPrivateKeyRec g_iCmapPrivateKeyRec; DevPrivateKeyRec g_iGCPrivateKeyRec; DevPrivateKeyRec g_iPixmapPrivateKeyRec; DevPrivateKeyRec g_iWindowPrivateKeyRec; -unsigned long g_ulServerGeneration = 0; -DWORD g_dwEnginesSupported = 0; -HINSTANCE g_hInstance = 0; -HWND g_hDlgDepthChange = NULL; -HWND g_hDlgExit = NULL; -HWND g_hDlgAbout = NULL; -const char * g_pszQueryHost = NULL; -Bool g_fXdmcpEnabled = FALSE; -Bool g_fAuthEnabled = FALSE; -HICON g_hIconX = NULL; -HICON g_hSmallIconX = NULL; +unsigned long g_ulServerGeneration = 0; +DWORD g_dwEnginesSupported = 0; +HINSTANCE g_hInstance = 0; +HWND g_hDlgDepthChange = NULL; +HWND g_hDlgExit = NULL; +HWND g_hDlgAbout = NULL; +const char *g_pszQueryHost = NULL; +Bool g_fXdmcpEnabled = FALSE; +Bool g_fAuthEnabled = FALSE; +HICON g_hIconX = NULL; +HICON g_hSmallIconX = NULL; + #ifndef RELOCATE_PROJECTROOT -const char * g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; +const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; #else -const char * g_pszLogFile = "XWin.log"; -Bool g_fLogFileChanged = FALSE; +const char *g_pszLogFile = "XWin.log"; +Bool g_fLogFileChanged = FALSE; #endif -int g_iLogVerbose = 2; -Bool g_fLogInited = FALSE; -char * g_pszCommandLine = NULL; -Bool g_fSilentFatalError = FALSE; -DWORD g_dwCurrentThreadID = 0; -Bool g_fKeyboardHookLL = FALSE; -Bool g_fNoHelpMessageBox = FALSE; -Bool g_fSoftwareCursor = FALSE; -Bool g_fSilentDupError = FALSE; -Bool g_fNativeGl = FALSE; - +int g_iLogVerbose = 2; +Bool g_fLogInited = FALSE; +char *g_pszCommandLine = NULL; +Bool g_fSilentFatalError = FALSE; +DWORD g_dwCurrentThreadID = 0; +Bool g_fKeyboardHookLL = FALSE; +Bool g_fNoHelpMessageBox = FALSE; +Bool g_fSoftwareCursor = FALSE; +Bool g_fSilentDupError = FALSE; +Bool g_fNativeGl = FALSE; #ifdef XWIN_CLIPBOARD /* * Wrapped DIX functions */ -winDispatchProcPtr winProcEstablishConnectionOrig = NULL; -winDispatchProcPtr winProcQueryTreeOrig = NULL; -winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL; - +winDispatchProcPtr winProcEstablishConnectionOrig = NULL; +winDispatchProcPtr winProcQueryTreeOrig = NULL; +winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL; /* * Clipboard variables */ -Bool g_fUnicodeClipboard = TRUE; -Bool g_fClipboard = TRUE; -Bool g_fClipboardLaunched = FALSE; -Bool g_fClipboardStarted = FALSE; -pthread_t g_ptClipboardProc; -HWND g_hwndClipboard = NULL; -void *g_pClipboardDisplay = NULL; -Window g_iClipboardWindow = None; -Atom g_atomLastOwnedSelection = None; +Bool g_fUnicodeClipboard = TRUE; +Bool g_fClipboard = TRUE; +Bool g_fClipboardLaunched = FALSE; +Bool g_fClipboardStarted = FALSE; +pthread_t g_ptClipboardProc; +HWND g_hwndClipboard = NULL; +void *g_pClipboardDisplay = NULL; +Window g_iClipboardWindow = None; +Atom g_atomLastOwnedSelection = None; #endif - /* * Re-initialize global variables that are invalidated * by a server reset. */ void -winInitializeGlobals (void) +winInitializeGlobals(void) { - g_dwCurrentThreadID = GetCurrentThreadId (); + g_dwCurrentThreadID = GetCurrentThreadId(); #ifdef XWIN_CLIPBOARD - g_iClipboardWindow = None; - g_pClipboardDisplay = NULL; - g_atomLastOwnedSelection = None; - g_hwndClipboard = NULL; + g_iClipboardWindow = None; + g_pClipboardDisplay = NULL; + g_atomLastOwnedSelection = None; + g_hwndClipboard = NULL; #endif } |