From f9d6b0d5284bdac7acfdc6137efa52adadc696b9 Mon Sep 17 00:00:00 2001 From: Bluemangoo Date: Fri, 14 Mar 2025 18:14:53 +0800 Subject: [PATCH] shit c89 --- .clangd | 2 +- .vscode/c.code-snippets | 6 +++--- .vscode/c_cpp_properties.json | 6 +----- .vscode/tasks.json | 3 ++- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.clangd b/.clangd index e961faa..7976114 100644 --- a/.clangd +++ b/.clangd @@ -1,2 +1,2 @@ CompileFlags: - Add: [-IC:/ProgramData/mingw64/mingw64/include, -IC:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include] \ No newline at end of file + Add: [-IC:/ProgramData/mingw64/mingw64/include, -IC:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include, -std=c89] \ No newline at end of file diff --git a/.vscode/c.code-snippets b/.vscode/c.code-snippets index e5479e0..b0be228 100644 --- a/.vscode/c.code-snippets +++ b/.vscode/c.code-snippets @@ -10,10 +10,10 @@ "description": "Define function swap two var with macro" }, "Define var swapper": { - "prefix": "fn_var_swapper", + "prefix": "fn_define_swapper", "body": [ - "#define SWAPPER(type, name) \\", - " void name(type *a, type *b) { \\", + "#define DEFINE_SWAPPER(type) \\", + " void swap_##type(type *a, type *b) { \\", " type t = *a; \\", " *a = *b; \\", " *b = t; \\", diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index de4c94a..38f77b2 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -3,18 +3,14 @@ { "name": "Win32", "includePath": [ - // "${workspaceFolder}/**", "C:/ProgramData/mingw64/mingw64/include", "C:/ProgramData/mingw64/mingw64/x86_64-w64-mingw32/include" ], "defines": [], "compilerPath": "gcc", "intelliSenseMode": "windows-gcc-x64", - "cStandard": "c99", + "cStandard": "c89", "cppStandard": "c++17" - // "browse": { - // "limitSymbolsToIncludedHeaders": true - // } } ], "version": 4 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a5592fa..13d1a01 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,10 +2,11 @@ "tasks": [ { "type": "cppbuild", - "label": "C/C++: gcc 生成活动文件", + "label": "C/C++: gcc 编译-c89", "command": "gcc", "args": [ "-fdiagnostics-color=always", + "-std=c89", "-g", "${file}", "-o",