diff options
-rw-r--r-- | hw/xwin/InitOutput.c | 23 | ||||
-rw-r--r-- | hw/xwin/Makefile.am | 1 | ||||
-rwxr-xr-x | hw/xwin/glx/gen_gl_wrappers.py | 10 | ||||
-rw-r--r-- | hw/xwin/glx/glwrap.c | 2 | ||||
-rw-r--r-- | hw/xwin/glx/indirect.c | 12 | ||||
-rw-r--r-- | hw/xwin/win.h | 18 | ||||
-rw-r--r-- | hw/xwin/winallpriv.c | 2 | ||||
-rw-r--r-- | hw/xwin/winclipboard.h | 3 | ||||
-rw-r--r-- | hw/xwin/winclipboardtextconv.c | 10 | ||||
-rw-r--r-- | hw/xwin/winclipboardthread.c | 5 | ||||
-rw-r--r-- | hw/xwin/winclipboardwrappers.c | 9 | ||||
-rw-r--r-- | hw/xwin/wincursor.c | 3 | ||||
-rw-r--r-- | hw/xwin/winerror.c | 4 | ||||
-rw-r--r-- | hw/xwin/wingc.c | 5 | ||||
-rw-r--r-- | hw/xwin/winlayouts.h | 10 | ||||
-rw-r--r-- | hw/xwin/winmonitors.c | 8 | ||||
-rw-r--r-- | hw/xwin/winmsg.c | 4 | ||||
-rw-r--r-- | hw/xwin/winmsg.h | 30 | ||||
-rw-r--r-- | hw/xwin/winmultiwindowwm.c | 8 | ||||
-rw-r--r-- | hw/xwin/winprefs.c | 21 | ||||
-rw-r--r-- | hw/xwin/winprefslex.l | 7 | ||||
-rw-r--r-- | hw/xwin/winprefsyacc.y | 10 | ||||
-rw-r--r-- | hw/xwin/winprocarg.c | 4 | ||||
-rw-r--r-- | hw/xwin/winregistry.c | 65 | ||||
-rw-r--r-- | hw/xwin/winscrinit.c | 6 | ||||
-rw-r--r-- | hw/xwin/winvalargs.c | 2 | ||||
-rw-r--r-- | hw/xwin/winwindow.c | 6 | ||||
-rw-r--r-- | hw/xwin/winwindowswm.c | 5 | ||||
-rw-r--r-- | include/os.h | 4 |
29 files changed, 95 insertions, 202 deletions
diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 1cf0f02eb..4bcd3a006 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -77,11 +77,6 @@ static void winClipboardShutdown(void); #endif -#if defined(DDXOSVERRORF) -void - OsVendorVErrorF(const char *pszFormat, va_list va_args); -#endif - static Bool winCheckDisplayNumber(void); @@ -299,11 +294,11 @@ winCheckMount(void) } while ((ent = getmntent(mnt)) != NULL) { - BOOL system = (winCheckMntOpt(ent, "user") != NULL); + BOOL sys = (winCheckMntOpt(ent, "user") != NULL); BOOL root = (strcmp(ent->mnt_dir, "/") == 0); BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0); - if (system) { + if (sys) { if (root) curlevel = sys_root; else if (tmp) @@ -897,7 +892,7 @@ ddxUseMsg(void) */ void -InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) +InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) { int i; @@ -940,15 +935,15 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) LoadPreferences(); /* Setup global screen info parameters */ - screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - screenInfo->numPixmapFormats = NUMFORMATS; + pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; + pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; + pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; + pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; + pScreenInfo->numPixmapFormats = NUMFORMATS; /* Describe how we want common pixmap formats padded */ for (i = 0; i < NUMFORMATS; i++) { - screenInfo->formats[i] = g_PixmapFormats[i]; + pScreenInfo->formats[i] = g_PixmapFormats[i]; } /* Load pointers to DirectDraw functions */ diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am index 33729a906..99dc55631 100644 --- a/hw/xwin/Makefile.am +++ b/hw/xwin/Makefile.am @@ -95,7 +95,6 @@ SRCS = InitInput.c \ winprefsyacc.y \ winprefslex.l \ winprocarg.c \ - winregistry.c \ winscrinit.c \ winshaddd.c \ winshadddnl.c \ diff --git a/hw/xwin/glx/gen_gl_wrappers.py b/hw/xwin/glx/gen_gl_wrappers.py index 15f7ef868..2273589c9 100755 --- a/hw/xwin/glx/gen_gl_wrappers.py +++ b/hw/xwin/glx/gen_gl_wrappers.py @@ -146,9 +146,8 @@ for line in glspec : arglist_use = m1.group(2) wrappers[function] = {} - # near and far might be reserved words or macros so can't be used as formal parameter names - arglist_use = arglist_use.replace('near','zNear') - arglist_use = arglist_use.replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + arglist_use = ',' .join([i.rstrip() + '_' for i in arglist_use.split(",")]) wrappers[function]['arglist_use'] = arglist_use param_count = 0 @@ -217,9 +216,8 @@ for w in sorted(wrappers.keys()) : if k.startswith('param') : l = wrappers[w][k].split() - # near and far might be reserved words or macros so can't be used as formal parameter names - l[0] = l[0].replace('near','zNear') - l[0] = l[0].replace('far','zFar') + # ensure formal parameter names don't collide with reserved names or shadow global declarations + l[0] = l[0] + '_' if l[2] == 'in' : if l[3] == 'array' : diff --git a/hw/xwin/glx/glwrap.c b/hw/xwin/glx/glwrap.c index 690b82926..73cff3cc1 100644 --- a/hw/xwin/glx/glwrap.c +++ b/hw/xwin/glx/glwrap.c @@ -67,7 +67,7 @@ glWinCallDelta(void) } static PROC -glWinResolveHelper(PROC * cache, char *symbol) +glWinResolveHelper(PROC * cache, const char *symbol) { PROC proc = NULL; diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 97b6045b7..c0069a20f 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -1626,15 +1626,15 @@ glxWinCreateContext(__GLXscreen * screen, */ static int -GetShift(int Mask) +GetShift(int mask) { - int Shift = 0; + int shift = 0; - while ((Mask &1) == 0) { - Shift++; - Mask >>=1; + while ((mask &1) == 0) { + shift++; + mask >>=1; } - return Shift; + return shift; } static int diff --git a/hw/xwin/win.h b/hw/xwin/win.h index 08d0d3f92..7b34e84d9 100644 --- a/hw/xwin/win.h +++ b/hw/xwin/win.h @@ -857,11 +857,13 @@ void #ifdef DDXOSVERRORF void - OSVenderVErrorF(const char *pszFormat, va_list va_args); +OsVendorVErrorF(const char *pszFormat, va_list va_args) +_X_ATTRIBUTE_PRINTF(1, 0); #endif void - winMessageBoxF(const char *pszError, UINT uType, ...); +winMessageBoxF(const char *pszError, UINT uType, ...) +_X_ATTRIBUTE_PRINTF(1, 3); #ifdef XWIN_NATIVEGDI /* @@ -1052,18 +1054,6 @@ void winPolyLineNativeGDI(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); #endif - -#ifdef XWIN_NATIVEGDI -/* - * winpushpxl.c - */ - -void - -winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, - int dx, int dy, int xOrg, int yOrg); -#endif - /* * winscrinit.c */ diff --git a/hw/xwin/winallpriv.c b/hw/xwin/winallpriv.c index ea3126fa0..cc3b3d1ba 100644 --- a/hw/xwin/winallpriv.c +++ b/hw/xwin/winallpriv.c @@ -110,7 +110,7 @@ winAllocatePrivates(ScreenPtr pScreen) */ Bool -winInitCmapPrivates(ColormapPtr pcmap, int index) +winInitCmapPrivates(ColormapPtr pcmap, int i) { #if CYGDEBUG winDebug("winInitCmapPrivates\n"); diff --git a/hw/xwin/winclipboard.h b/hw/xwin/winclipboard.h index 27eb2f96f..2cd775d6b 100644 --- a/hw/xwin/winclipboard.h +++ b/hw/xwin/winclipboard.h @@ -79,7 +79,6 @@ */ extern char *display; -extern void ErrorF(const char * /*f */ , ...); extern void winDebug(const char *format, ...); extern void winErrorFVerb(int verb, const char *format, ...); @@ -100,7 +99,7 @@ void winClipboardDOStoUNIX(char *pszData, int iLength); void - winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength); + winClipboardUNIXtoDOS(char **ppszData, int iLength); /* * winclipboardthread.c diff --git a/hw/xwin/winclipboardtextconv.c b/hw/xwin/winclipboardtextconv.c index 74a351b17..fd405a02e 100644 --- a/hw/xwin/winclipboardtextconv.c +++ b/hw/xwin/winclipboardtextconv.c @@ -38,7 +38,7 @@ void winClipboardDOStoUNIX(char *pszSrc, int iLength); void - winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength); + winClipboardUNIXtoDOS(char **ppszData, int iLength); /* * Convert \r\n to \n @@ -75,12 +75,12 @@ winClipboardDOStoUNIX(char *pszSrc, int iLength) */ void -winClipboardUNIXtoDOS(unsigned char **ppszData, int iLength) +winClipboardUNIXtoDOS(char **ppszData, int iLength) { int iNewlineCount = 0; - unsigned char *pszSrc = *ppszData; - unsigned char *pszEnd = pszSrc + iLength; - unsigned char *pszDest = NULL, *pszDestBegin = NULL; + char *pszSrc = *ppszData; + char *pszEnd = pszSrc + iLength; + char *pszDest = NULL, *pszDestBegin = NULL; winDebug("UNIXtoDOS () - Original data:'%s'\n", *ppszData); diff --git a/hw/xwin/winclipboardthread.c b/hw/xwin/winclipboardthread.c index f2e8e6d6f..891278279 100644 --- a/hw/xwin/winclipboardthread.c +++ b/hw/xwin/winclipboardthread.c @@ -47,7 +47,6 @@ */ extern Bool g_fUnicodeClipboard; -extern unsigned long serverGeneration; extern Bool g_fClipboardStarted; extern Bool g_fClipboardLaunched; extern Bool g_fClipboard; @@ -413,7 +412,7 @@ winClipboardProc(void *pvNotUsed) ("winClipboardProc - the clipboard thread has restarted %d times and seems to be unstable, disabling clipboard integration\n", clipboardRestarts); g_fClipboard = FALSE; - return; + return NULL; } if (g_fClipboard) { @@ -422,7 +421,7 @@ winClipboardProc(void *pvNotUsed) /* Create the clipboard client thread */ if (!winInitClipboard()) { ErrorF("winClipboardProc - winClipboardInit failed.\n"); - return; + return NULL; } winDebug("winClipboardProc - winInitClipboard returned.\n"); diff --git a/hw/xwin/winclipboardwrappers.c b/hw/xwin/winclipboardwrappers.c index 1118f4ff8..008088b6a 100644 --- a/hw/xwin/winclipboardwrappers.c +++ b/hw/xwin/winclipboardwrappers.c @@ -49,10 +49,6 @@ * Local function prototypes */ -int winProcEstablishConnection(ClientPtr /* client */ ); -int winProcQueryTree(ClientPtr /* client */ ); -int winProcSetSelectionOwner(ClientPtr /* client */ ); - DISPATCH_PROC(winProcEstablishConnection); DISPATCH_PROC(winProcSetSelectionOwner); @@ -60,10 +56,8 @@ DISPATCH_PROC(winProcSetSelectionOwner); * References to external symbols */ -extern int g_iNumScreens; extern unsigned int g_uiAuthDataLen; extern char *g_pAuthData; -extern Bool g_fXdmcpEnabled; extern Bool g_fClipboardLaunched; extern Bool g_fClipboardStarted; extern Bool g_fClipboard; @@ -71,9 +65,6 @@ extern Window g_iClipboardWindow; extern Atom g_atomLastOwnedSelection; extern HWND g_hwndClipboard; -extern winDispatchProcPtr winProcEstablishConnectionOrig; -extern winDispatchProcPtr winProcQueryTreeOrig; -extern winDispatchProcPtr winProcSetSelectionOwnerOrig; /* * Wrapper for internal EstablishConnection function. diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c index b56104fde..b5ea0db1b 100644 --- a/hw/xwin/wincursor.c +++ b/hw/xwin/wincursor.c @@ -158,7 +158,6 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) HBITMAP hAnd, hXor; ICONINFO ii; unsigned char *pCur; - int x, y; unsigned char bit; HDC hDC; BITMAPV4HEADER bi; @@ -262,6 +261,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) sizeof(unsigned long)); if (lpBits) { + int y; for (y = 0; y < nCY; y++) { unsigned long *src, *dst; @@ -305,6 +305,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) pCur = (unsigned char *) lpBits; if (lpBits) { + int x, y; for (y = 0; y < pScreenPriv->cursor.sm_cy; y++) { for (x = 0; x < pScreenPriv->cursor.sm_cx; x++) { if (x >= nCX || y >= nCY) /* Outside of X11 icon bounds */ diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c index 56c1e34e7..6645469fc 100644 --- a/hw/xwin/winerror.c +++ b/hw/xwin/winerror.c @@ -36,10 +36,6 @@ #include "win.h" #ifdef DDXOSVERRORF -/* Prototype */ -void - OsVendorVErrorF(const char *pszFormat, va_list va_args); - void OsVendorVErrorF(const char *pszFormat, va_list va_args) { diff --git a/hw/xwin/wingc.c b/hw/xwin/wingc.c index 8b7c7040c..7ac305d06 100644 --- a/hw/xwin/wingc.c +++ b/hw/xwin/wingc.c @@ -33,11 +33,6 @@ #endif #include "win.h" -void - -winPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, - int dy, int xOrg, int yOrg); - /* * Local prototypes */ diff --git a/hw/xwin/winlayouts.h b/hw/xwin/winlayouts.h index d8875ceb5..8b6b98407 100644 --- a/hw/xwin/winlayouts.h +++ b/hw/xwin/winlayouts.h @@ -30,11 +30,11 @@ typedef struct { unsigned int winlayout; int winkbtype; - char *xkbmodel; - char *xkblayout; - char *xkbvariant; - char *xkboptions; - char *layoutname; + const char *xkbmodel; + const char *xkblayout; + const char *xkbvariant; + const char *xkboptions; + const char *layoutname; } WinKBLayoutRec, *WinKBLayoutPtr; /* diff --git a/hw/xwin/winmonitors.c b/hw/xwin/winmonitors.c index 07532f6f5..955fb9214 100644 --- a/hw/xwin/winmonitors.c +++ b/hw/xwin/winmonitors.c @@ -27,6 +27,10 @@ from The Open Group. */ +#ifdef HAVE_XWIN_CONFIG_H +#include <xwin-config.h> +#endif + #include "win.h" #include "winmonitors.h" @@ -55,13 +59,13 @@ getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) } Bool -QueryMonitor(int index, struct GetMonitorInfoData *data) +QueryMonitor(int i, struct GetMonitorInfoData *data) { /* prepare data */ if (data == NULL) return FALSE; memset(data, 0, sizeof(*data)); - data->requestedMonitor = index; + data->requestedMonitor = i; /* query information */ EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); diff --git a/hw/xwin/winmsg.c b/hw/xwin/winmsg.c index 07c2f30eb..57c1d1888 100644 --- a/hw/xwin/winmsg.c +++ b/hw/xwin/winmsg.c @@ -38,7 +38,9 @@ #endif #include <stdarg.h> -void winVMsg(int, MessageType, int verb, const char *, va_list); +void +winVMsg(int, MessageType, int verb, const char *, va_list) +_X_ATTRIBUTE_PRINTF(4, 0); void winVMsg(int scrnIndex, MessageType type, int verb, const char *format, diff --git a/hw/xwin/winmsg.h b/hw/xwin/winmsg.h index ec285ba1f..b638f2cb3 100644 --- a/hw/xwin/winmsg.h +++ b/hw/xwin/winmsg.h @@ -34,15 +34,29 @@ * Function prototypes */ -void winDrvMsgVerb(int scrnIndex, - MessageType type, int verb, const char *format, ...); -void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...); -void winMsgVerb(MessageType type, int verb, const char *format, ...); -void winMsg(MessageType type, const char *format, ...); -void winDebug(const char *format, ...); -void winTrace(const char *format, ...); +void +winDrvMsgVerb(int scrnIndex, + MessageType type, int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(4, 5); +void +winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) +_X_ATTRIBUTE_PRINTF(3, 4); +void +winMsgVerb(MessageType type, int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(3, 4); +void +winMsg(MessageType type, const char *format, ...) +_X_ATTRIBUTE_PRINTF(2, 3); +void +winDebug(const char *format, ...) +_X_ATTRIBUTE_PRINTF(1, 2); +void +winTrace(const char *format, ...) +_X_ATTRIBUTE_PRINTF(1, 2); -void winErrorFVerb(int verb, const char *format, ...); +void +winErrorFVerb(int verb, const char *format, ...) +_X_ATTRIBUTE_PRINTF(2, 3); void winW32Error(int verb, const char *message); void winW32ErrorEx(int verb, const char *message, DWORD errorcode); void winDebugWin32Message(const char *function, HWND hwnd, UINT message, diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c index ffb7c2d0f..ac9d57976 100644 --- a/hw/xwin/winmultiwindowwm.c +++ b/hw/xwin/winmultiwindowwm.c @@ -132,13 +132,6 @@ typedef struct _XMsgProcArgRec { } XMsgProcArgRec, *XMsgProcArgPtr; /* - * References to external symbols - */ - -extern char *display; -extern void ErrorF(const char * /*f */ , ...); - -/* * Prototypes for local functions */ @@ -526,7 +519,6 @@ getHwnd(WMInfoPtr pWMInfo, Window iWindow) static void UpdateName(WMInfoPtr pWMInfo, Window iWindow) { - wchar_t *pszName; HWND hWnd; XWindowAttributes attr; diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index faa97c351..dbc5b5228 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -57,9 +57,6 @@ extern int parse_file(FILE * fp); /* Currently in use command ID, incremented each new menu item created */ static int g_cmdid = STARTMENUID; -/* Defined in DIX */ -extern char *display; - /* Local function to handle comma-ified icon names */ static HICON LoadImageComma(char *fname, int sx, int sy, int flags); @@ -330,12 +327,12 @@ HandleCustomWM_COMMAND(unsigned long hwndIn, int command) case CMD_EXEC: if (fork() == 0) { struct rlimit rl; - unsigned long i; + int fd; /* Close any open descriptors except for STD* */ getrlimit(RLIMIT_NOFILE, &rl); - for (i = STDERR_FILENO + 1; i < rl.rlim_cur; i++) - close(i); + for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++) + close(fd); /* Disassociate any TTYs */ setsid(); @@ -538,21 +535,21 @@ static HICON LoadImageComma(char *fname, int sx, int sy, int flags) { HICON hicon; - int index; + int i; char file[PATH_MAX + NAME_MAX + 2]; /* Some input error checking */ if (!fname || !fname[0]) return NULL; - index = 0; + i = 0; hicon = NULL; if (fname[0] == ',') { /* It's the XWIN.EXE resource they want */ - index = atoi(fname + 1); + i = atoi(fname + 1); hicon = LoadImage(g_hInstance, - MAKEINTRESOURCE(index), IMAGE_ICON, sx, sy, flags); + MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags); } else { file[0] = 0; @@ -569,8 +566,8 @@ LoadImageComma(char *fname, int sx, int sy, int flags) /* Specified as <fname>,<index> */ *(strrchr(file, ',')) = 0; /* End string at comma */ - index = atoi(strrchr(fname, ',') + 1); - hicon = ExtractIcon(g_hInstance, file, index); + i = atoi(strrchr(fname, ',') + 1); + hicon = ExtractIcon(g_hInstance, file, i); } else { /* Just an .ico file... */ diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l index ba8aea696..15f707766 100644 --- a/hw/xwin/winprefslex.l +++ b/hw/xwin/winprefslex.l @@ -37,14 +37,10 @@ #include <string.h> #include "winprefsyacc.h" -extern YYSTYPE yylval; -extern char *yytext; extern int yyparse(void); extern void ErrorF (const char* /*f*/, ...); -int yylineno; - /* Copy the parsed string, must be free()d in yacc parser */ static char *makestr(char *str) { @@ -62,6 +58,9 @@ static char *makestr(char *str) %} %option yylineno +%option nounput +%option noinput +%option never-interactive %% \#.*[\r\n] { /* comment */ return NEWLINE; } diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 0acf160e4..3b376b3e7 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -37,6 +37,7 @@ #endif #include <stdio.h> #include <stdlib.h> +#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ #include <string.h> #include "winprefs.h" @@ -80,7 +81,6 @@ static void CloseSysMenu(void); static int yyerror (char *s); -extern void ErrorF (const char* /*f*/, ...); extern char *yytext; extern int yylex(void); @@ -283,16 +283,16 @@ SetTrayIcon (char *fname) } static void -SetRootMenu (char *menu) +SetRootMenu (char *menuname) { - strncpy (pref.rootMenuName, menu, MENU_MAX); + strncpy (pref.rootMenuName, menuname, MENU_MAX); pref.rootMenuName[MENU_MAX] = 0; } static void -SetDefaultSysMenu (char *menu, int pos) +SetDefaultSysMenu (char *menuname, int pos) { - strncpy (pref.defaultSysMenuName, menu, MENU_MAX); + strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); pref.defaultSysMenuName[MENU_MAX] = 0; pref.defaultSysMenuPos = pos; } diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index a5b3c07bf..14056faf0 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -56,10 +56,6 @@ void void winLogVersionInfo(void); -#ifdef DDXOSVERRORF -void OsVendorVErrorF(const char *pszFormat, va_list va_args); -#endif - /* * Process arguments on the command line */ diff --git a/hw/xwin/winregistry.c b/hw/xwin/winregistry.c deleted file mode 100644 index d33f8c363..000000000 --- a/hw/xwin/winregistry.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved. - * - *Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - *"Software"), to deal in the Software without restriction, including - *without limitation the rights to use, copy, modify, merge, publish, - *distribute, sublicense, and/or sell copies of the Software, and to - *permit persons to whom the Software is furnished to do so, subject to - *the following conditions: - * - *The above copyright notice and this permission notice shall be - *included in all copies or substantial portions of the Software. - * - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - *EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - *NONINFRINGEMENT. IN NO EVENT SHALL HAROLD L HUNT II BE LIABLE FOR - *ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - *CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - *WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - *Except as contained in this notice, the name of Harold L Hunt II - *shall not be used in advertising or otherwise to promote the sale, use - *or other dealings in this Software without prior written authorization - *from Harold L Hunt II. - * - * Authors: Harold L Hunt II - */ - -#ifdef HAVE_XWIN_CONFIG_H -#include <xwin-config.h> -#endif -#include "win.h" - -/* Prototypes */ -DWORD winGetRegistryDWORD(HKEY hkey, char *pszRegistryKey); - -DWORD -winGetRegistryDWORD(HKEY hkey, char *pszRegistryKey) -{ - HKEY hkResult; - DWORD dwDisposition; - - RegCreateKeyEx(hkey, - pszRegistryKey, - 0, - '\0', - REG_OPTION_NON_VOLATILE, - KEY_READ, NULL, &hkResult, &dwDisposition); - - if (dwDisposition == REG_CREATED_NEW_KEY) { - ErrorF("winGetRegistryDWORD - Created new key: %s\n", pszRegistryKey); - } - else if (dwDisposition == REG_OPENED_EXISTING_KEY) { - ErrorF("winGetRegistryDWORD - Opened existing key: %s\n", - pszRegistryKey); - } - - /* Free the registry key handle */ - RegCloseKey(hkResult); - hkResult = NULL; - - return 0; -} diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index be25f12af..639a99ca3 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -254,7 +254,7 @@ winCreateScreenResources(ScreenPtr pScreen) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) +winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; @@ -578,11 +578,11 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitNativeGDI(int index, +winFinishScreenInitNativeGDI(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); - winScreenInfoPtr pScreenInfo = &g_ScreenInfo[index]; + winScreenInfoPtr pScreenInfo = &g_ScreenInfo[i]; VisualPtr pVisuals = NULL; DepthPtr pDepths = NULL; VisualID rootVisual = 0; diff --git a/hw/xwin/winvalargs.c b/hw/xwin/winvalargs.c index eb6e973b8..edfd71f72 100644 --- a/hw/xwin/winvalargs.c +++ b/hw/xwin/winvalargs.c @@ -57,9 +57,7 @@ Bool winValidateArgs(void) { int i; - int iMaxConsecutiveScreen = 0; BOOL fHasNormalScreen0 = FALSE; - BOOL fImplicitScreenFound = FALSE; /* * Check for a malformed set of -screen parameters. diff --git a/hw/xwin/winwindow.c b/hw/xwin/winwindow.c index 594791789..ab6d8dec2 100644 --- a/hw/xwin/winwindow.c +++ b/hw/xwin/winwindow.c @@ -59,7 +59,6 @@ winCreateWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -82,7 +81,6 @@ winDestroyWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -105,7 +103,6 @@ winPositionWindowNativeGDI(WindowPtr pWin, int x, int y) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -210,7 +207,6 @@ winChangeWindowAttributesNativeGDI(WindowPtr pWin, unsigned long mask) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -238,7 +234,6 @@ winUnmapWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG @@ -262,7 +257,6 @@ winMapWindowNativeGDI(WindowPtr pWin) Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; - winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 88c375733..fbd41aaa8 100644 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -82,7 +82,6 @@ static int ProcWindowsWMQueryVersion(ClientPtr client) { xWindowsWMQueryVersionReply rep; - int n; REQUEST_SIZE_MATCH(xWindowsWMQueryVersionReq); rep.type = X_Reply; @@ -491,7 +490,7 @@ ProcWindowsWMFrameSetTitle(ClientPtr client) #endif title_bytes = malloc(title_length + 1); - strncpy(title_bytes, (unsigned char *) &stuff[1], title_length); + strncpy(title_bytes, (char *) &stuff[1], title_length); title_bytes[title_length] = '\0'; pRLWinPriv = (win32RootlessWindowPtr) RootlessFrameForWindow(pWin, FALSE); @@ -562,8 +561,6 @@ SNotifyEvent(xWindowsWMNotifyEvent * from, xWindowsWMNotifyEvent * to) static int SProcWindowsWMQueryVersion(ClientPtr client) { - int n; - REQUEST(xWindowsWMQueryVersionReq); swaps(&stuff->length); return ProcWindowsWMQueryVersion(client); diff --git a/include/os.h b/include/os.h index e32421610..c7108a5d3 100644 --- a/include/os.h +++ b/include/os.h @@ -88,7 +88,9 @@ extern void ddxBeforeReset(void); #endif #ifdef DDXOSVERRORF -extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, va_list args); +extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, + va_list args) +_X_ATTRIBUTE_PRINTF(1, 0); #endif extern _X_EXPORT int WaitForSomething(int * /*pClientsReady */ |