diag.cpp
来自「这是用vc++语言编写的程序」· C++ 代码 · 共 57 行
CPP
57 行
/*This file is part of the FIRE -- Flexible Image Retrieval SystemFIRE is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.FIRE is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with FIRE; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/#include <string>#include <cstdlib>#include <iostream>#include <sstream>#include "diag.hpp"using namespace std;// common function, where else to place ??bool CheckRuntimeDebugLevel(int level, bool set) { static int s_Level = -1; if (set) s_Level=level; if (s_Level == -1) { char * p = getenv("DEBUG_LEVEL"); if (p) { string s(p); cout << "DEBUG_LEVEL is " << s << endl; istringstream is(s); is >> s_Level; cout << "DEBUG_LEVEL set to " << s_Level << endl; } } if (s_Level == -1) s_Level=99; return level<=s_Level;}string GetCurrentWorkingDirectory() { char cwd[1024]; getcwd(cwd, 1024); return ::std::string(cwd);}void printCmdline(uint argc, char **argv) { cout << argv[0]; for(uint i=1;i<argc;++i) { cout << " " << argv[i]; } cout << endl;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?