- Fixed some const char * -> char * conversions flagged by GCC 4.2.0 in the

Win32-specific code.


SVN r508 (trunk)
This commit is contained in:
Randy Heit 2007-03-29 01:03:50 +00:00
parent 97ad5a0d6b
commit f6dd9be993
5 changed files with 16 additions and 12 deletions

View file

@ -1,4 +1,7 @@
March 28, 2007
- Fixed some const char * -> char * conversions flagged by GCC 4.2.0 in the
Win32-specific code.
- Fixed: The Win32 neterror() should return a const char *.
- Adding blinky text to the ENDOOM screen.
March 24, 2007

View file

@ -95,7 +95,7 @@ static sockaddr_in sendaddress[MAXNETNODES];
static BYTE sendplayer[MAXNETNODES];
#ifdef __WIN32__
char *neterror (void);
const char *neterror (void);
#else
#define neterror() strerror(errno)
#endif
@ -850,7 +850,7 @@ void I_NetCmd (void)
}
#ifdef __WIN32__
char *neterror (void)
const char *neterror (void)
{
static char neterr[16];
int code;

View file

@ -44,6 +44,7 @@ void ChildSigHandler (int signum)
#ifdef _WIN32
const char TimiditySong::EventName[] = "TiMidity Killer";
static char TimidityTitle[] = "TiMidity (ZDoom Launched)";
CVAR (String, timidity_exe, "timidity.exe", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
#else
@ -438,7 +439,7 @@ bool TimiditySong::LaunchTimidity ()
WriteWavePipe : GetStdHandle (STD_OUTPUT_HANDLE);
startup.hStdError = GetStdHandle (STD_ERROR_HANDLE);
startup.lpTitle = "TiMidity (ZDoom Launched)";
startup.lpTitle = TimidityTitle;
startup.wShowWindow = SW_SHOWMINNOACTIVE;
if (CreateProcess (NULL, cmdline, NULL, NULL, TRUE,

View file

@ -799,14 +799,11 @@ INT_PTR CALLBACK NewEAXProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
if (0 == GetWindowText (GetDlgItem (hDlg, IDC_NEWENVNAME), buff, 32) ||
S_FindEnvironment (buff) != NULL)
{
static CHAR *texts[2] =
{
"That name is already used.",
"Please enter a name."
};
static CHAR text0[] = "That name is already used.";
static CHAR text1[] = "Please enter a name.";
ti.uId = 0;
ti.hwnd = GetDlgItem (hDlg, IDC_NEWENVNAME);
ti.lpszText = buff[0] ? texts[0] : texts[1];
ti.lpszText = buff[0] ? text0 : text1;
ShowErrorTip (ToolTip, ti, hDlg, "Bad Name");
return 0;
}
@ -820,9 +817,10 @@ INT_PTR CALLBACK NewEAXProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
if (id1 > 255 || id2 > 255)
{
static CHAR text[] = "Please enter a number between 0 and 255.";
ti.uId = id1 > 255 ? 1 : 2;
ti.hwnd = GetDlgItem (hDlg, IDC_EDITID1 + ti.uId - 1);
ti.lpszText = "Please enter a number between 0 and 255.";
ti.lpszText = text;
ShowErrorTip (ToolTip, ti, hDlg, "Bad Value");
}
else if (NULL != (rev = S_FindEnvironment (MAKEWORD (id2, id1))))

View file

@ -1690,6 +1690,8 @@ static INT_PTR CALLBACK OverviewDlgProc (HWND hDlg, UINT message, WPARAM wParam,
static INT_PTR CALLBACK CrashDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static CHAR overview[] = "Overview";
static CHAR details[] = "Details";
HWND edit;
TCITEM tcitem;
RECT tabrect, tcrect;
@ -1709,14 +1711,14 @@ static INT_PTR CALLBACK CrashDlgProc (HWND hDlg, UINT message, WPARAM wParam, LP
// There are two tabs: Overview and Details. Each pane is created from a
// dialog template, and the resultant window is stored as the lParam for
// the corresponding tab.
tcitem.pszText = "Overview";
tcitem.pszText = overview;
tcitem.lParam = (LPARAM)CreateDialogParam (g_hInst, MAKEINTRESOURCE(IDD_CRASHOVERVIEW), hDlg, OverviewDlgProc, (LPARAM)edit);
TabCtrl_InsertItem (edit, 0, &tcitem);
TabCtrl_GetItemRect (edit, 0, &tabrect);
SetWindowPos ((HWND)tcitem.lParam, HWND_TOP, tcrect.left + 3, tcrect.top + tabrect.bottom + 3,
tcrect.right - tcrect.left - 8, tcrect.bottom - tcrect.top - tabrect.bottom - 8, 0);
tcitem.pszText = "Details";
tcitem.pszText = details;
tcitem.lParam = (LPARAM)CreateDialogParam (g_hInst, MAKEINTRESOURCE(IDD_CRASHDETAILS), hDlg, DetailsDlgProc, (LPARAM)edit);
TabCtrl_InsertItem (edit, 1, &tcitem);
SetWindowPos ((HWND)tcitem.lParam, HWND_TOP, tcrect.left + 3, tcrect.top + tabrect.bottom + 3,