no message

master
zcy 2020-08-30 15:13:54 +08:00
parent 4fe2c2638c
commit 92bc997726
4 changed files with 81 additions and 8 deletions

View File

@ -2,6 +2,72 @@
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"files.associations": { "files.associations": {
"cstring": "cpp", "cstring": "cpp",
"memory": "cpp" "memory": "cpp",
"string": "cpp",
"cctype": "cpp",
"cmath": "cpp",
"concepts": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"initializer_list": "cpp",
"ios": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocinfo": "cpp",
"xlocnum": "cpp",
"xmemory": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xutility": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"cstdarg": "cpp",
"ctime": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"fstream": "cpp",
"mutex": "cpp",
"sstream": "cpp",
"thread": "cpp",
"cinttypes": "cpp"
} }
} }

View File

@ -16,13 +16,15 @@ using namespace std;
typedef enum { typedef enum {
ENV_WINDOWS = 1, ENV_WINDOWS = 1,
ENV_LINUX, ENV_LINUX,
ENV_UNIX ENV_UNIX,
ENV_NONE,
}ENV_SYS; }ENV_SYS;
typedef enum{ typedef enum{
GCC = 1, GCC = 1,
CLANG = 2, CLANG = 2,
CL = 3 CL = 3,
UNKNOWN
}ENV_COMPILER; }ENV_COMPILER;
inline ENV_SYS CurrentEnvSys(); inline ENV_SYS CurrentEnvSys();
inline ENV_COMPILER CurrentEnvCompiler(); inline ENV_COMPILER CurrentEnvCompiler();

View File

@ -10,8 +10,7 @@ int PrintDumpObjvoid (void *dst,int rowNum,int num,bool ifAsii){
if (left != 0){ if (left != 0){
row += 1; row += 1;
} }
snprintf(out,strlen("LN: "),"LN: "); snprintf(out,5,"LN: ");
//char out[10240] = "LN: " ;
for (int z = 1;z < rowNum + 1; z++) { for (int z = 1;z < rowNum + 1; z++) {
char tmp[4] = {0}; char tmp[4] = {0};
sprintf(tmp,"%02d ",z); sprintf(tmp,"%02d ",z);

View File

@ -19,15 +19,21 @@ inline ENV_SYS CurrentEnvSys(){
#ifdef _UNIX #ifdef _UNIX
return ENV_UNIX return ENV_UNIX
#endif #endif
#ifdef _WIN32
return ENV_WINDOWS
#endif
return ENV_NONE;
} }
inline ENV_COMPILER CurrentEnvCompiler(){ inline ENV_COMPILER CurrentEnvCompiler(){
ifdef __GNUC__ #ifdef __GNUC__
return GCC; return GCC;
#endif #endif
ifdef _MSC_VER #ifdef _MSC_VER
return CL; return CL;
#endif #endif
ifdef __clang__ #ifdef __clang__
return CLANG; return CLANG;
#endif #endif
return UNKNOWN;
} }