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

📄 debug.cpp

📁 使用BorlandC++4.5编译的一个MUD客户端程序
💻 CPP
字号:
head	2.2;access;symbols;locks; strict;comment	@// @;2.2date	95.10.27.20.05.02;	author tsurace;	state Release;branches;next	2.1;2.1date	95.10.24.15.52.51;	author tsurace;	state Exp;branches;next	1.1;1.1date	95.10.11.20.59.54;	author tsurace;	state Beta;branches;next	;desc@Debugging macro commands and message dialogs.@2.2log@Modified formatting of ASSERT failure dialog.@text@// ------------------------------------------------------------------------
// debug.cpp - debugging and error-checking routines
//
// $Id: debug.cpp 2.1 1995/10/24 15:52:51 tsurace Exp tsurace $
// $Log: debug.cpp $
// 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 //
@2.1log@Roll.@text@d4 4a7 4// $Id: debug.cpp 1.1 1995/10/11 20:59:54 tsurace Beta tsurace $// $Log: debug.cpp $// Revision 1.1  1995/10/11  20:59:54  tsurace// Initial revisiond9 3d38 1a38 1             "'%.80s'\n%.40s:%40d\n%.80s",@1.1log@Initial revision@text@d4 5a8 2// $Id$// $Log$@

⌨️ 快捷键说明

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