Backport (from branches/2.0):

- ChangeLog for 2.0.6
- Exception handler


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1293 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2007-03-29 09:45:11 +00:00
parent baf02b66df
commit 6d5b7850c4
4 changed files with 21 additions and 9 deletions

View File

@ -21,15 +21,22 @@
* Fix: Missing transport in Campaign 2 Mission 1 and Campaign 3 Mission 1 arrives again
* Fix: Various crashes
* Graphics:
* New: Skybox
* New: Translucent selection-box from version 1.x restored
* Fix: Better fog
* Fix: Wrongly displayed tileset in Campaign 2 Mission 1 and Campaign 3 Mission 1 properly fixed
* Fix: Camera now properly displayed on radar
* Fix: Gamma control support improved
* Fix: Colors on Mac corrected
* Sound:
* Fix: No more invalid OpenAL errors
* Fix: Properly startup without sound
* Cutscenes (still text only):
* Change: Make texts more easily readable
* Change: Proceed faster so it does not look as if Warzone hangs
* Change: Exit by pressing left mouse button
* Commandline options:
* Fix: --resolution works as expect now
* Fix: --resolution works as expected now
* Build system:
* New: Docs can now be installed in Autotools builds
* New: You can now control the installation dir for the icon and .desktop file by passing --icondir and --applicationdir to configure

View File

@ -19,10 +19,12 @@
*/
#include "frame.h"
#if defined(WZ_OS_WIN)
# include "dbghelp.h"
/**
* Exception handling on Windows.
* Ask the user whether he wants to safe a Minidump and then dump it into the temp directory.
@ -86,8 +88,10 @@ static LONG WINAPI windowsExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
return EXCEPTION_CONTINUE_SEARCH;
}
#elif defined(WZ_OS_POSIX)
// C99 headers:
# include <stdint.h>
# include <signal.h>
@ -119,8 +123,8 @@ static struct sigaction oldAction[NSIG];
static struct utsname sysInfo;
static BOOL gdbIsAvailable = FALSE, sysInfoValid = FALSE;
static char programPID[MAX_PID_STRING] = {'\0'}, gdbPath[MAX_PATH] = {'\0'}, * programCommand = NULL;
static const char *gdmpPath;
static char programPID[MAX_PID_STRING] = {'\0'}, gdbPath[MAX_PATH] = {'\0'};
static const char * gdmpPath, * programCommand;
/**
@ -467,8 +471,8 @@ static void posixExceptionHandler(int signum, siginfo_t * siginfo, WZ_DECL_UNUSE
pid = fork();
if (pid == (pid_t)0)
{
char * gdbArgv[] = { gdbPath, programCommand, programPID, NULL },
* gdbEnv[] = {NULL};
const char * gdbArgv[] = { gdbPath, programCommand, programPID, NULL },
* gdbEnv[] = {NULL};
close(gdbPipe[1]); // No output to pipe
@ -478,7 +482,7 @@ static void posixExceptionHandler(int signum, siginfo_t * siginfo, WZ_DECL_UNUSE
write(dumpFile, "GDB extended backtrace:\n",
strlen("GDB extended backtrace:\n"));
execve(gdbPath, gdbArgv, gdbEnv);
execve(gdbPath, (char**)gdbArgv, (char**)gdbEnv);
}
else if (pid > (pid_t)0)
{
@ -519,6 +523,7 @@ static void posixExceptionHandler(int signum, siginfo_t * siginfo, WZ_DECL_UNUSE
raise(signum);
}
#endif // WZ_OS_*
@ -527,7 +532,7 @@ static void posixExceptionHandler(int signum, siginfo_t * siginfo, WZ_DECL_UNUSE
*
* \param programCommand_x Command used to launch this program. Only used for POSIX handler.
*/
void setupExceptionHandler(char * programCommand_x)
void setupExceptionHandler(const char * programCommand_x)
{
#if defined(WZ_OS_WIN)
SetUnhandledExceptionFilter(windowsExceptionHandler);

View File

@ -200,6 +200,6 @@ static inline void endian_fract(FRACT *fract) {
# define endian_fract(x)
#endif
void setupExceptionHandler(char * programCommand);
void setupExceptionHandler(const char * programCommand);
#endif

View File

@ -280,7 +280,7 @@ static void initialize_PhysicsFS(void)
*/
static void scanDataDirs( void )
{
char tmpstr[MAX_PATH], prefix[MAX_PATH] = { '\0' };
char tmpstr[MAX_PATH] = {'\0'}, prefix[MAX_PATH] = {'\0'};
// Find out which PREFIX we are in...
strcpy( tmpstr, PHYSFS_getBaseDir() );