diff options
author | nijtmans <nijtmans> | 2010-11-24 12:57:54 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-11-24 12:57:54 (GMT) |
commit | 13fd371fb175d2dc12a9ec83a2cd45f540086857 (patch) | |
tree | 26f234749525dff7e183264ebe09404a7410fb50 /win/winMain.c | |
parent | 930f63116a08dfa71d8fea47aece5a47bfc0cf4a (diff) | |
download | tk-13fd371fb175d2dc12a9ec83a2cd45f540086857.zip tk-13fd371fb175d2dc12a9ec83a2cd45f540086857.tar.gz tk-13fd371fb175d2dc12a9ec83a2cd45f540086857.tar.bz2 |
use TkpDisplayWarning as panic proc on Windows, but restore panic
dialog title to exactly what it was in Tk 8.5 ("Fatal Error in Wish")
Diffstat (limited to 'win/winMain.c')
-rw-r--r-- | win/winMain.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/win/winMain.c b/win/winMain.c index c679d81..2525972 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: winMain.c,v 1.39 2010/11/24 10:34:18 nijtmans Exp $ + * RCS: @(#) $Id: winMain.c,v 1.40 2010/11/24 12:57:54 nijtmans Exp $ */ #include "tk.h" @@ -199,7 +199,7 @@ Tcl_AppInit( if (Registry_Init(interp) == TCL_ERROR) { goto error; } - Tcl_StaticPackage(interp, "registry", Registry_Init, NULL); + Tcl_StaticPackage(interp, "registry", Registry_Init, 0); if (Dde_Init(interp) == TCL_ERROR) { goto error; @@ -242,7 +242,12 @@ Tcl_AppInit( return TCL_OK; error: - WishPanic("%s", (Tcl_GetStringResult)(interp)); + MessageBeep(MB_ICONEXCLAMATION); + TkpDisplayWarning((Tcl_GetStringResult)(interp), "Error in Wish"); +#ifdef _MSC_VER + DebugBreak(); +#endif + ExitProcess(1); /* * We won't reach this, but we need the return. @@ -267,10 +272,6 @@ error: *---------------------------------------------------------------------- */ -/* Make sure we don't call those through the stub table */ -#undef Tcl_WinUtfToTChar -#undef Tcl_DStringFree - void WishPanic( const char *format, ...) @@ -281,7 +282,7 @@ WishPanic( MessageBeep(MB_ICONEXCLAMATION); va_start(argList, format); vsprintf(buf, format, argList); - TkpDisplayWarning(buf, "Error in Wish"); + TkpDisplayWarning(buf, "Fatal Error in Wish"); #ifdef _MSC_VER DebugBreak(); #endif @@ -470,7 +471,7 @@ setargv( *arg = '\0'; argSpace = arg + 1; } - argv[argc] = NULL; + argv[argc] = 0; *argcPtr = argc; *argvPtr = argv; |