⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debug.cpp

📁 使用BorlandC++4.5编译的一个MUD客户端程序
💻 CPP
字号:
// ------------------------------------------------------------------------
// debug.cpp - debugging and error-checking routines
//
// $Id: debug.cpp 2.2 1995/10/27 20:05:02 tsurace Beta $
// $Log: debug.cpp $// Revision 2.2  1995/10/27  20:05:02  tsurace// Modified formatting of ASSERT failure dialog.//
// Revision 2.1  1995/10/24  15:52:51  tsurace
// Roll.
//
// Revision 1.1  1995/10/11  20:59:54  tsurace
// Initial revision
//
// (end of log)

#define  STRICT
#include <windows.h>
#pragma hdrstop

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "debug.hpp"

// ------------------------------------------------------------------------
// _MyWin32Assert - assertion failure function
//
// Note that at this point I am hoping that, because *I* caught this
// with an ASSERT macro, there hasn't been a fatal app error yet.
//
void _MyWin32Assert(const char * prm,    //                80
                    const char * file,   // max width used 40 
                    int          line,   //                40  
                    const char * comment) //               80

{
    static char msg[275];  // Big enough, I reck'n
    sprintf (msg,
             "'%.80s'\n%.40s:%-40d\n%.80s",
             prm,      file, line,  comment);
             
    // Parentless, system-modal info message, limited to 3 lines,
    // but will show regardless of the status of system memory
    MessageBox(NULL,
               msg,
               "ASSERT failure!",
               MB_SYSTEMMODAL | MB_ICONHAND | MB_OK);
    
    DebugBreak();             // Crap out or stop
    abort();
};

// EOF //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -