Merge branch 'NetHack-3.6'
This commit is contained in:
@@ -475,23 +475,6 @@ char *buf;
|
||||
}
|
||||
#endif /* RUNTIME_PORT_ID */
|
||||
|
||||
/* nhassert_failed is called when an nhassert's condition is false */
|
||||
void nhassert_failed(const char * exp, const char * file, int line)
|
||||
{
|
||||
char message[128];
|
||||
_snprintf(message, sizeof(message),
|
||||
"NHASSERT(%s) in '%s' at line %d\n", exp, file, line);
|
||||
|
||||
if (IsDebuggerPresent()) {
|
||||
OutputDebugStringA(message);
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
// strip off the newline
|
||||
message[strlen(message) - 1] = '\0';
|
||||
error(message);
|
||||
}
|
||||
|
||||
void
|
||||
nethack_exit(code)
|
||||
int code;
|
||||
@@ -725,6 +708,23 @@ sys_random_seed(VOID_ARGS)
|
||||
}
|
||||
return ourseed;
|
||||
}
|
||||
|
||||
/* nt_assert_failed is called when an nhassert's condition is false */
|
||||
void
|
||||
nt_assert_failed(expression, filepath, line)
|
||||
const char * expression;
|
||||
const char * filepath;
|
||||
int line;
|
||||
{
|
||||
const char * filename;
|
||||
|
||||
/* get file name from path */
|
||||
filename = strrchr(filepath, '\\');
|
||||
filename = (filename == NULL ? filepath : filename + 1);
|
||||
impossible("nhassert(%s) failed in file '%s' at line %d",
|
||||
expression, filename, line);
|
||||
}
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
/*winnt.c*/
|
||||
|
||||
Reference in New Issue
Block a user