aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-12-10 19:06:59 +0000
committermarha <marha@users.sourceforge.net>2010-12-10 19:06:59 +0000
commit3a20d23b48c1051e1f22295fd886cc7f643417f6 (patch)
tree5192dddd9ecf591de2e22504f7268c2935382d90 /xorg-server/hw/xwin
parent531a0d974b98074978535f086a73b6b662fa0cea (diff)
downloadvcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.gz
vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.tar.bz2
vcxsrv-3a20d23b48c1051e1f22295fd886cc7f643417f6.zip
xserver git update 10/12/2010
Diffstat (limited to 'xorg-server/hw/xwin')
-rw-r--r--xorg-server/hw/xwin/win.h7
-rw-r--r--xorg-server/hw/xwin/windialogs.c5
-rw-r--r--xorg-server/hw/xwin/winerror.c24
3 files changed, 21 insertions, 15 deletions
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index 253f194e0..e790d2d73 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -221,9 +221,10 @@ if (fDebugProcMsg) \
{ \
char *pszTemp; \
int iLength; \
- pszTemp = Xprintf (str, ##__VA_ARGS__); \
- MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \
- free(pszTemp); \
+ if (asprintf (&pszTemp, str, ##__VA_ARGS__) != -1) { \
+ MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \
+ free (pszTemp); \
+ } \
}
#else
#define DEBUG_MSG(str,...)
diff --git a/xorg-server/hw/xwin/windialogs.c b/xorg-server/hw/xwin/windialogs.c
index d040af59a..8c648e84a 100644
--- a/xorg-server/hw/xwin/windialogs.c
+++ b/xorg-server/hw/xwin/windialogs.c
@@ -341,11 +341,10 @@ winExitDlgProc (HWND hDialog, UINT message,
winInitDialog (hDialog);
/* Format the connected clients string */
- pszConnectedClients = Xprintf (CONNECTED_CLIENTS_FORMAT,
+ if (asprintf (&pszConnectedClients, CONNECTED_CLIENTS_FORMAT,
(s_pScreenPriv->iConnectedClients == 1) ? "is" : "are",
s_pScreenPriv->iConnectedClients,
- (s_pScreenPriv->iConnectedClients == 1) ? "" : "s");
- if (!pszConnectedClients)
+ (s_pScreenPriv->iConnectedClients == 1) ? "" : "s") == -1)
return TRUE;
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c
index 1ee8c572f..988c5952e 100644
--- a/xorg-server/hw/xwin/winerror.c
+++ b/xorg-server/hw/xwin/winerror.c
@@ -101,12 +101,15 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
char * pszErrorF = NULL;
char * pszMsgBox = NULL;
va_list args;
+ int size;
va_start(args, uType);
- pszErrorF = Xvprintf(pszError, args);
+ size = vasprintf (&pszErrorF, pszError, args);
va_end(args);
- if (!pszErrorF)
+ if (size == -1) {
+ pszErrorF = NULL;
goto winMessageBoxF_Cleanup;
+ }
#define MESSAGEBOXF \
"%s\n" \
@@ -117,15 +120,18 @@ winMessageBoxF (const char *pszError, UINT uType, ...)
"XWin was started with the following command-line:\n\n" \
"%s\n"
- pszMsgBox = Xprintf (MESSAGEBOXF,
- pszErrorF, XVENDORNAME,
- XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
- BUILDERADDR,
- BUILDERSTRING,
- g_pszCommandLine);
+ size = asprintf (&pszMsgBox, MESSAGEBOXF,
+ pszErrorF, XVENDORNAME,
+ XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH,
+ XORG_VERSION_SNAP, XORG_VERSION_CURRENT,
+ BUILDERADDR,
+ BUILDERSTRING,
+ g_pszCommandLine);
- if (!pszMsgBox)
+ if (size == -1) {
+ pszMsgBox = NULL;
goto winMessageBoxF_Cleanup;
+ }
/* Display the message box string */
MessageBox (NULL,