diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2024-10-26 08:16:12 +0200 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2024-10-26 08:16:12 +0200 |
| commit | 8d3929c224cc40e8571758ba67327241e173b16a (patch) | |
| tree | 0e8c1be5ba8765b763ff415d0578ff43ce9cbf91 /dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc | |
| parent | baeffaff228cc31ff6f55d39bfbac9355c26f305 (diff) | |
IMP: Improvements and fixes.
Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc')
| -rw-r--r-- | dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc b/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc index 2d1e4c4..9121679 100644 --- a/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc +++ b/dev/ToolchainKit/src/CPlusPlusCompilerPreProcessor.cc @@ -324,16 +324,16 @@ void bpp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) } } - if (hdr_line.find("//") != std::string::npos) + if (hdr_line.find("--/") != std::string::npos) { - hdr_line.erase(hdr_line.find("//")); + hdr_line.erase(hdr_line.find("--/")); } - if (hdr_line.find("/*") != std::string::npos) + if (hdr_line.find("--*") != std::string::npos) { inactive_code = true; // get rid of comment. - hdr_line.erase(hdr_line.find("/*")); + hdr_line.erase(hdr_line.find("--*")); } /// BPP 'brief' documentation. @@ -858,7 +858,7 @@ void bpp_parse_file(std::ifstream& hdr_file, std::ofstream& pp_out) for (auto& include : kIncludes) { std::string header_path = include; - header_path.push_back('/'); + header_path.push_back('-'); header_path += path; std::ifstream header(header_path); @@ -967,27 +967,27 @@ TOOLCHAINKIT_MODULE(CPlusPlusPreprocessorMain) continue; } - if (argv[index][0] == '/') + if (argv[index][0] == '-') { - if (strcmp(argv[index], "/bpp:ver") == 0) + if (strcmp(argv[index], "--bpp:ver") == 0) { printf("%s\n", "bpp v1.11, (c) ZKA Web Services Co"); return 0; } - if (strcmp(argv[index], "/bpp:?") == 0) + if (strcmp(argv[index], "--bpp:?") == 0) { printf("%s\n", "ZKA Preprocessor Driver v1.11, (c) ZKA Web Services Co"); - printf("%s\n", "/bpp:working-dir <path>: set directory to working path."); - printf("%s\n", "/bpp:include-dir <path>: add directory to include path."); - printf("%s\n", "/bpp:def <name> <value>: define a macro."); - printf("%s\n", "/bpp:ver: print the version."); - printf("%s\n", "/bpp:?: show help (this current command)."); + printf("%s\n", "--bpp:working-dir <path>: set directory to working path."); + printf("%s\n", "--bpp:include-dir <path>: add directory to include path."); + printf("%s\n", "--bpp:def <name> <value>: define a macro."); + printf("%s\n", "--bpp:ver: print the version."); + printf("%s\n", "--bpp:?: show help (this current command)."); return 0; } - if (strcmp(argv[index], "/bpp:include-dir") == 0) + if (strcmp(argv[index], "--bpp:include-dir") == 0) { std::string inc = argv[index + 1]; @@ -996,14 +996,14 @@ TOOLCHAINKIT_MODULE(CPlusPlusPreprocessorMain) kIncludes.push_back(inc); } - if (strcmp(argv[index], "/bpp:working-dir") == 0) + if (strcmp(argv[index], "--bpp:working-dir") == 0) { std::string inc = argv[index + 1]; skip = true; kWorkingDir = inc; } - if (strcmp(argv[index], "/bpp:def") == 0 && argv[index + 1] != nullptr && + if (strcmp(argv[index], "--bpp:def") == 0 && argv[index + 1] != nullptr && argv[index + 2] != nullptr) { std::string macro_key = argv[index + 1]; |
