diff options
author | davygrvy <davygrvy@pobox.com> | 2003-12-24 04:18:18 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2003-12-24 04:18:18 (GMT) |
commit | 5d224fb11538aa654ba2028f75e5ffa06df2c579 (patch) | |
tree | eff546c6e792fecd4310f81379419c1d68d63c28 /win | |
parent | bdb55bff6176c625c664d4ea5a4ec5187839d7a8 (diff) | |
download | tcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.zip tcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.tar.gz tcl-5d224fb11538aa654ba2028f75e5ffa06df2c579.tar.bz2 |
All uses of 'panic' (the macro) changed
to 'Tcl_Panic' (the function). The #define
of panic in tcl.h clearly states it is
deprecated in the comments.
[Patch 865264]
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWin32Dll.c | 10 | ||||
-rw-r--r-- | win/tclWinChan.c | 18 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 14 | ||||
-rw-r--r-- | win/tclWinNotify.c | 4 | ||||
-rw-r--r-- | win/tclWinPipe.c | 16 | ||||
-rw-r--r-- | win/tclWinSock.c | 4 | ||||
-rw-r--r-- | win/tclWinThrd.c | 26 |
7 files changed, 47 insertions, 45 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index b6e1c06..579cf55 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.29 2003/12/21 21:58:43 davygrvy Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.30 2003/12/24 04:18:22 davygrvy Exp $ */ #include "tclWinInt.h" @@ -325,7 +325,7 @@ TclWinInit(hInst) */ if (platformId == VER_PLATFORM_WIN32s) { - panic("Win32s is not a supported platform"); + Tcl_Panic("Win32s is not a supported platform"); } tclWinProcs = &asciiProcs; @@ -473,11 +473,11 @@ TclpCheckStackSpace() "=r"(RESTORED_HANDLER) ); if (INITIAL_ESP != RESTORED_ESP) - panic("ESP restored incorrectly"); + Tcl_Panic("ESP restored incorrectly"); if (INITIAL_EBP != RESTORED_EBP) - panic("EBP restored incorrectly"); + Tcl_Panic("EBP restored incorrectly"); if (INITIAL_HANDLER != RESTORED_HANDLER) - panic("HANDLER restored incorrectly"); + Tcl_Panic("HANDLER restored incorrectly"); # endif /* TCL_MEM_DEBUG */ #else } __except (EXCEPTION_EXECUTE_HANDLER) {} diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 0ab586d..6c5edb2 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.32 2003/12/13 03:11:02 davygrvy Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.33 2003/12/24 04:18:22 davygrvy Exp $ */ #include "tclWinInt.h" @@ -779,7 +779,7 @@ TclpOpenFileChannel(interp, pathPtr, mode, permissions) channelPermissions = (TCL_READABLE | TCL_WRITABLE); break; default: - panic("TclpOpenFileChannel: invalid mode value"); + Tcl_Panic("TclpOpenFileChannel: invalid mode value"); break; } @@ -1093,11 +1093,11 @@ Tcl_MakeFileChannel(rawHandle, mode) "=r"(RESTORED_HANDLER) ); if (INITIAL_ESP != RESTORED_ESP) - panic("ESP restored incorrectly"); + Tcl_Panic("ESP restored incorrectly"); if (INITIAL_EBP != RESTORED_EBP) - panic("EBP restored incorrectly"); + Tcl_Panic("EBP restored incorrectly"); if (INITIAL_HANDLER != RESTORED_HANDLER) - panic("HANDLER restored incorrectly"); + Tcl_Panic("HANDLER restored incorrectly"); # endif /* TCL_MEM_DEBUG */ if (result) @@ -1189,7 +1189,7 @@ TclpGetDefaultStdChannel(type) bufMode = "none"; break; default: - panic("TclGetDefaultStdChannel: Unexpected channel type"); + Tcl_Panic("TclGetDefaultStdChannel: Unexpected channel type"); break; } @@ -1388,9 +1388,9 @@ TclpCutFileChannel(chan) * local data in each thread. */ - if (!removed) - panic("file info ptr not on thread channel list"); - + if (!removed) { + Tcl_Panic("file info ptr not on thread channel list"); + } } /* diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index c565d33..1062a3f 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.38 2003/12/17 17:47:28 vincentdarley Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.39 2003/12/24 04:18:22 davygrvy Exp $ */ #include "tclWinInt.h" @@ -238,11 +238,11 @@ DoRenameFile( "=r"(RESTORED_HANDLER) ); if (INITIAL_ESP != RESTORED_ESP) - panic("ESP restored incorrectly"); + Tcl_Panic("ESP restored incorrectly"); if (INITIAL_EBP != RESTORED_EBP) - panic("EBP restored incorrectly"); + Tcl_Panic("EBP restored incorrectly"); if (INITIAL_HANDLER != RESTORED_HANDLER) - panic("HANDLER restored incorrectly"); + Tcl_Panic("HANDLER restored incorrectly"); # endif /* TCL_MEM_DEBUG */ #else } __except (EXCEPTION_EXECUTE_HANDLER) {} @@ -600,11 +600,11 @@ DoCopyFile( "=r"(RESTORED_HANDLER) ); if (INITIAL_ESP != RESTORED_ESP) - panic("ESP restored incorrectly"); + Tcl_Panic("ESP restored incorrectly"); if (INITIAL_EBP != RESTORED_EBP) - panic("EBP restored incorrectly"); + Tcl_Panic("EBP restored incorrectly"); if (INITIAL_HANDLER != RESTORED_HANDLER) - panic("HANDLER restored incorrectly"); + Tcl_Panic("HANDLER restored incorrectly"); # endif /* TCL_MEM_DEBUG */ #else } __except (EXCEPTION_EXECUTE_HANDLER) {} diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 8cf4c4c..65faf8e 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.12 2003/03/21 03:23:24 dgp Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.13 2003/12/24 04:18:22 davygrvy Exp $ */ #include "tclWinInt.h" @@ -107,7 +107,7 @@ Tcl_InitNotifier() class.hCursor = NULL; if (!RegisterClassA(&class)) { - panic("Unable to register TclNotifier window class"); + Tcl_Panic("Unable to register TclNotifier window class"); } } notifierCount++; diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index acba180..4edf214 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.38 2003/10/21 23:25:47 andreas_kupries Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.39 2003/12/24 04:18:23 davygrvy Exp $ */ #include "tclWinInt.h" @@ -874,7 +874,7 @@ TclpCloseFile( break; default: - panic("TclpCloseFile: unexpected file type"); + Tcl_Panic("TclpCloseFile: unexpected file type"); } ckfree((char *) filePtr); @@ -1215,17 +1215,19 @@ TclpCreateProcess( if (*end == '/') break; } - if (*end != '/') - panic("no / in executable path name"); + if (*end != '/') { + Tcl_Panic("no / in executable path name"); + } i = (end - start) + 1; pipeDllPtr = Tcl_NewStringObj(start, i); Tcl_AppendToObj(pipeDllPtr, Tcl_DStringValue(&pipeDll), -1); Tcl_IncrRefCount(pipeDllPtr); - if (Tcl_FSConvertToPathType(interp, pipeDllPtr) != TCL_OK) - panic("Tcl_FSConvertToPathType failed"); + if (Tcl_FSConvertToPathType(interp, pipeDllPtr) != TCL_OK) { + Tcl_Panic("Tcl_FSConvertToPathType failed"); + } fileExists = (Tcl_FSAccess(pipeDllPtr, F_OK) == 0); if (!fileExists) { - panic("Tcl pipe dll \"%s\" not found", + Tcl_Panic("Tcl pipe dll \"%s\" not found", Tcl_DStringValue(&pipeDll)); } Tcl_DStringAppend(&cmdLine, Tcl_DStringValue(&pipeDll), -1); diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 91236cb..a790b31 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.40 2003/12/12 00:59:09 davygrvy Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.41 2003/12/24 04:18:23 davygrvy Exp $ */ #include "tclWinInt.h" @@ -2726,7 +2726,7 @@ TclpCutSockChannel(chan) */ if (!removed) { - panic("file info ptr not on thread channel list"); + Tcl_Panic("file info ptr not on thread channel list"); } /* diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index b6f7a89..026a55e 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinThrd.c,v 1.26 2003/05/13 10:16:17 mistachkin Exp $ + * RCS: @(#) $Id: tclWinThrd.c,v 1.27 2003/12/24 04:18:23 davygrvy Exp $ */ #include "tclWinInt.h" @@ -548,7 +548,7 @@ TclpThreadDataKeyInit(keyPtr) if (newKey != TLS_OUT_OF_INDEXES) { *indexPtr = newKey; } else { - panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */ + Tcl_Panic("TlsAlloc failed from TclpThreadDataKeyInit!"); /* this should be a fatal error */ } *keyPtr = (Tcl_ThreadDataKey)indexPtr; TclRememberDataKey(keyPtr); @@ -585,7 +585,7 @@ TclpThreadDataKeyGet(keyPtr) } else { result = TlsGetValue(*indexPtr); if ((result == NULL) && (GetLastError() != NO_ERROR)) { - panic("TlsGetValue failed from TclpThreadDataKeyGet!"); + Tcl_Panic("TlsGetValue failed from TclpThreadDataKeyGet!"); } return result; } @@ -618,7 +618,7 @@ TclpThreadDataKeySet(keyPtr, data) BOOL success; success = TlsSetValue(*indexPtr, (void *)data); if (!success) { - panic("TlsSetValue failed from TclpThreadDataKeySet!"); + Tcl_Panic("TlsSetValue failed from TclpThreadDataKeySet!"); } } @@ -657,11 +657,11 @@ TclpFinalizeThreadData(keyPtr) ckfree((char *)result); success = TlsSetValue(*indexPtr, (void *)NULL); if (!success) { - panic("TlsSetValue failed from TclpFinalizeThreadData!"); + Tcl_Panic("TlsSetValue failed from TclpFinalizeThreadData!"); } } else { if (GetLastError() != NO_ERROR) { - panic("TlsGetValue failed from TclpFinalizeThreadData!"); + Tcl_Panic("TlsGetValue failed from TclpFinalizeThreadData!"); } } } @@ -697,7 +697,7 @@ TclpFinalizeThreadDataKey(keyPtr) indexPtr = *(DWORD **)keyPtr; success = TlsFree(*indexPtr); if (!success) { - panic("TlsFree failed from TclpFinalizeThreadDataKey!"); + Tcl_Panic("TlsFree failed from TclpFinalizeThreadDataKey!"); } ckfree((char *)indexPtr); *keyPtr = NULL; @@ -1017,7 +1017,7 @@ TclpNewAllocMutex(void) lockPtr = malloc(sizeof(struct lock)); if (lockPtr == NULL) { - panic("could not allocate lock"); + Tcl_Panic("could not allocate lock"); } lockPtr->tlock = (Tcl_Mutex) &lockPtr->wlock; InitializeCriticalSection(&lockPtr->wlock); @@ -1039,13 +1039,13 @@ TclpGetAllocCache(void) key = TlsAlloc(); once = 1; if (key == TLS_OUT_OF_INDEXES) { - panic("could not allocate thread local storage"); + Tcl_Panic("could not allocate thread local storage"); } } result = TlsGetValue(key); if ((result == NULL) && (GetLastError() != NO_ERROR)) { - panic("TlsGetValue failed from TclpGetAllocCache!"); + Tcl_Panic("TlsGetValue failed from TclpGetAllocCache!"); } return result; } @@ -1056,7 +1056,7 @@ TclpSetAllocCache(void *ptr) BOOL success; success = TlsSetValue(key, ptr); if (!success) { - panic("TlsSetValue failed from TclpSetAllocCache!"); + Tcl_Panic("TlsSetValue failed from TclpSetAllocCache!"); } } @@ -1070,12 +1070,12 @@ TclWinFreeAllocCache(void) if (ptr != NULL) { success = TlsSetValue(key, NULL); if (!success) { - panic("TlsSetValue failed from TclWinFreeAllocCache!"); + Tcl_Panic("TlsSetValue failed from TclWinFreeAllocCache!"); } TclFreeAllocCache(ptr); } else { if (GetLastError() != NO_ERROR) { - panic("TlsGetValue failed from TclWinFreeAllocCache!"); + Tcl_Panic("TlsGetValue failed from TclWinFreeAllocCache!"); } } } |