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

📄 chk_sysfile.cpp

📁 一个不错
💻 CPP
字号:
/* Copyright is licensed under GNU LGPL.                 by I.J.Wang 2005   Check WySysFile   Build: make chk_sysfile   Note: Test data files should exist in the working directory         Files may be created in the working directory and unlinked*/#include "wysysfile.h"#include "wy__cfunc.h"#include <iostream>#if WYSYSFILE_VERSION!=31#error Test code is for WYSYSFILE_VERSION 31#endifextern void ck_sysfile(void);static const WyStr chdr(                  "+----------------+\n"                  "| main(): caught |\n"                  "+----------------+\n");int main(void) throw()try { std::cout << "Checking wysysfile.h ...\n"; if(std::strcmp(WySysFile::class_name,"WySysFile")!=0) {   WY_THROW( WyRet() ); } #ifdef WY_DEBUG if(wydbg_get_fdcnt()!=0) {   WY_THROW( WyRet() );           // wydbg_get_fdcnt() should be 0 at startup } if(WySysFile::wydbg_get_objcnt()!=0) {   WY_THROW( WyRet() ); } #endif ck_sysfile(); std::cout << "Checked Ok "; #if defined(WY_DEBUG)||defined(NDEBUG)||(WYLIB_CONFIG_THROWSPC)   std::cout << ".. Symbol defined: "   #ifdef WY_DEBUG     "WY_DEBUG "   #endif   #ifdef NDEBUG     "NDEBUG "   #endif   #ifdef WYLIB_CONFIG_THROWSPC     "WYLIB_CONFIG_THROWSPC "   #endif   ; #endif std::cout<< "\n"; return(0);}catch(const WyRet& e) { std::cerr << chdr.c_str() << Wy::wrd(e).c_str() << std::endl; return(-1);}catch(const std::exception& e) { std::cerr << chdr.c_str() << "std::exception" << std::endl; return(-1);}catch(...) { std::cerr << chdr.c_str() << "unknown unwind" << std::endl; return(-1);};

⌨️ 快捷键说明

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