Add section for resetting files

This commit is contained in:
Joey Yakimowich-Payne 2018-07-08 13:05:09 +09:00
commit cc0999b70b
2 changed files with 10 additions and 2 deletions

View file

@ -79,6 +79,8 @@ _[n.global]_
```quotes``` = pick up any headers included using "" (and not <> which is typically used for standard headers) [default: true]
```reset``` = whether or not to reset all files after processing [default: false]
```filter``` = string to identify and recurse into library .h files in #include statements and exclude standard headers
```cpp_compiler``` = string to specify a CPP compiler executable. [default: g++]

View file

@ -9,6 +9,7 @@ var
gConfig: Config
gFilter = ""
gQuotes = true
gReset = false
gCppCompiler = "g++"
gCCompiler = "gcc"
gOutput = ""
@ -822,6 +823,10 @@ proc runCfg(cfg: string) =
if gConfig["n.global"]["quotes"] == "false":
gQuotes = false
if gConfig["n.global"].hasKey("reset"):
if gConfig["n.global"]["reset"] == "true":
gReset = true
if gConfig.hasKey("n.include"):
for inc in gConfig["n.include"].keys():
gIncludes.add(inc.addEnv())
@ -878,8 +883,9 @@ proc runCfg(cfg: string) =
runFile(file, gConfig[file])
# Reset files
gitReset()
if gReset:
# Reset files
gitReset()
# ###