From ac9505b53672f4097b471a955353be351821c49a Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 22 Feb 2025 22:35:33 +0300 Subject: [PATCH] Rename components/to_utf8 directory and files to follow naming conventions --- CI/file_name_exceptions.txt | 4 ---- apps/bulletobjecttool/main.cpp | 2 +- apps/components_tests/esmloader/load.cpp | 2 +- apps/components_tests/toutf8/toutf8.cpp | 2 +- apps/esmtool/tes4.cpp | 2 +- apps/essimporter/importer.cpp | 2 +- apps/mwiniimporter/importer.hpp | 2 +- apps/navmeshtool/main.cpp | 2 +- apps/opencs/editor.cpp | 2 +- apps/opencs/model/doc/document.hpp | 2 +- apps/opencs/model/doc/documentmanager.hpp | 2 +- apps/opencs/model/doc/saving.hpp | 2 +- apps/opencs/model/doc/savingstate.hpp | 2 +- apps/opencs/model/tools/mergeoperation.hpp | 2 +- apps/opencs/model/tools/mergestages.hpp | 2 +- apps/opencs/model/tools/tools.hpp | 2 +- apps/opencs/model/world/data.hpp | 2 +- apps/openmw/mwgui/journalbooks.hpp | 2 +- apps/openmw/mwgui/journalwindow.hpp | 2 +- apps/openmw/mwgui/windowmanagerimp.hpp | 2 +- apps/wizard/inisettings.hpp | 2 +- components/CMakeLists.txt | 6 +++--- components/esm3/esmreader.hpp | 2 +- components/esm3/esmwriter.cpp | 2 +- components/esm4/reader.cpp | 2 +- components/fontloader/fontloader.hpp | 2 +- components/nif/nifstream.cpp | 4 ++-- components/to_utf8/.gitignore | 1 - components/to_utf8/Makefile | 8 -------- components/toutf8/.gitignore | 1 + components/toutf8/Makefile | 8 ++++++++ components/{to_utf8/gen_iconv.cpp => toutf8/geniconv.cpp} | 4 ++-- .../{to_utf8/tables_gen.hpp => toutf8/tablesgen.hpp} | 4 ++-- components/{to_utf8/to_utf8.cpp => toutf8/toutf8.cpp} | 4 ++-- components/{to_utf8/to_utf8.hpp => toutf8/toutf8.hpp} | 4 ++-- components/translation/translation.hpp | 2 +- 36 files changed, 47 insertions(+), 51 deletions(-) delete mode 100644 components/to_utf8/.gitignore delete mode 100644 components/to_utf8/Makefile create mode 100644 components/toutf8/.gitignore create mode 100644 components/toutf8/Makefile rename components/{to_utf8/gen_iconv.cpp => toutf8/geniconv.cpp} (95%) rename components/{to_utf8/tables_gen.hpp => toutf8/tablesgen.hpp} (99%) rename components/{to_utf8/to_utf8.cpp => toutf8/toutf8.cpp} (99%) rename components/{to_utf8/to_utf8.hpp => toutf8/toutf8.hpp} (97%) diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt index 92fca5c11f..95ecafa856 100644 --- a/CI/file_name_exceptions.txt +++ b/CI/file_name_exceptions.txt @@ -12,7 +12,3 @@ components/crashcatcher/windows_crashcatcher.hpp components/crashcatcher/windows_crashmonitor.cpp components/crashcatcher/windows_crashmonitor.hpp components/crashcatcher/windows_crashshm.hpp -components/to_utf8/gen_iconv.cpp -components/to_utf8/tables_gen.hpp -components/to_utf8/to_utf8.cpp -components/to_utf8/to_utf8.hpp diff --git a/apps/bulletobjecttool/main.cpp b/apps/bulletobjecttool/main.cpp index 190eb3364d..857eb357aa 100644 --- a/apps/bulletobjecttool/main.cpp +++ b/apps/bulletobjecttool/main.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/apps/components_tests/esmloader/load.cpp b/apps/components_tests/esmloader/load.cpp index 20e06507d1..e5e1b15876 100644 --- a/apps/components_tests/esmloader/load.cpp +++ b/apps/components_tests/esmloader/load.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include diff --git a/apps/components_tests/toutf8/toutf8.cpp b/apps/components_tests/toutf8/toutf8.cpp index 704ee6742d..3c84da65ee 100644 --- a/apps/components_tests/toutf8/toutf8.cpp +++ b/apps/components_tests/toutf8/toutf8.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include diff --git a/apps/esmtool/tes4.cpp b/apps/esmtool/tes4.cpp index 5b657da573..4ff632a217 100644 --- a/apps/esmtool/tes4.cpp +++ b/apps/esmtool/tes4.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include namespace EsmTool { diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index 5cc9a8259b..cf04fee163 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -25,7 +25,7 @@ #include -#include +#include #include "importercontext.hpp" diff --git a/apps/mwiniimporter/importer.hpp b/apps/mwiniimporter/importer.hpp index 4c42caf5a3..342670713c 100644 --- a/apps/mwiniimporter/importer.hpp +++ b/apps/mwiniimporter/importer.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include class MwIniImporter { diff --git a/apps/navmeshtool/main.cpp b/apps/navmeshtool/main.cpp index 27f84104ac..5c7fe53126 100644 --- a/apps/navmeshtool/main.cpp +++ b/apps/navmeshtool/main.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/apps/opencs/editor.cpp b/apps/opencs/editor.cpp index 4cab88e5f2..0072a18d0d 100644 --- a/apps/opencs/editor.cpp +++ b/apps/opencs/editor.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include "view/doc/viewmanager.hpp" diff --git a/apps/opencs/model/doc/document.hpp b/apps/opencs/model/doc/document.hpp index 60516cdc8c..ac8f06712c 100644 --- a/apps/opencs/model/doc/document.hpp +++ b/apps/opencs/model/doc/document.hpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include "../world/data.hpp" #include "../world/idcompletionmanager.hpp" diff --git a/apps/opencs/model/doc/documentmanager.hpp b/apps/opencs/model/doc/documentmanager.hpp index 2c9ee1e98e..53caf04a0a 100644 --- a/apps/opencs/model/doc/documentmanager.hpp +++ b/apps/opencs/model/doc/documentmanager.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "loader.hpp" diff --git a/apps/opencs/model/doc/saving.hpp b/apps/opencs/model/doc/saving.hpp index 5dcdbb6803..6197798fdf 100644 --- a/apps/opencs/model/doc/saving.hpp +++ b/apps/opencs/model/doc/saving.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "operation.hpp" #include "savingstate.hpp" diff --git a/apps/opencs/model/doc/savingstate.hpp b/apps/opencs/model/doc/savingstate.hpp index c42dff0366..af8caa2c4d 100644 --- a/apps/opencs/model/doc/savingstate.hpp +++ b/apps/opencs/model/doc/savingstate.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include namespace CSMDoc { diff --git a/apps/opencs/model/tools/mergeoperation.hpp b/apps/opencs/model/tools/mergeoperation.hpp index 2cce2bec0d..c50a7eefb0 100644 --- a/apps/opencs/model/tools/mergeoperation.hpp +++ b/apps/opencs/model/tools/mergeoperation.hpp @@ -3,7 +3,7 @@ #include -#include +#include #include "../doc/operation.hpp" diff --git a/apps/opencs/model/tools/mergestages.hpp b/apps/opencs/model/tools/mergestages.hpp index 42f06858b1..40cc799c81 100644 --- a/apps/opencs/model/tools/mergestages.hpp +++ b/apps/opencs/model/tools/mergestages.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include #include "../doc/stage.hpp" diff --git a/apps/opencs/model/tools/tools.hpp b/apps/opencs/model/tools/tools.hpp index c9e8937c90..939dea9bb8 100644 --- a/apps/opencs/model/tools/tools.hpp +++ b/apps/opencs/model/tools/tools.hpp @@ -6,7 +6,7 @@ #include -#include +#include #include diff --git a/apps/opencs/model/world/data.hpp b/apps/opencs/model/world/data.hpp index 237b746746..c119541381 100644 --- a/apps/opencs/model/world/data.hpp +++ b/apps/opencs/model/world/data.hpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include "cell.hpp" #include "idcollection.hpp" diff --git a/apps/openmw/mwgui/journalbooks.hpp b/apps/openmw/mwgui/journalbooks.hpp index 1970830eab..792edcc070 100644 --- a/apps/openmw/mwgui/journalbooks.hpp +++ b/apps/openmw/mwgui/journalbooks.hpp @@ -4,7 +4,7 @@ #include "bookpage.hpp" #include "journalviewmodel.hpp" -#include +#include namespace MWGui { diff --git a/apps/openmw/mwgui/journalwindow.hpp b/apps/openmw/mwgui/journalwindow.hpp index 22e7048acf..f0f394156c 100644 --- a/apps/openmw/mwgui/journalwindow.hpp +++ b/apps/openmw/mwgui/journalwindow.hpp @@ -3,7 +3,7 @@ #include "windowbase.hpp" -#include +#include #include diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp index 052a269188..3b85b74a8d 100644 --- a/apps/openmw/mwgui/windowmanagerimp.hpp +++ b/apps/openmw/mwgui/windowmanagerimp.hpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include "charactercreation.hpp" #include "draganddrop.hpp" diff --git a/apps/wizard/inisettings.hpp b/apps/wizard/inisettings.hpp index c8cd30c3c1..6ea8fc4adb 100644 --- a/apps/wizard/inisettings.hpp +++ b/apps/wizard/inisettings.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include namespace Wizard { diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index d57b0ed823..217839ce61 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -155,9 +155,9 @@ add_component_dir (nifbullet bulletnifloader ) -add_component_dir (to_utf8 - tables_gen - to_utf8 +add_component_dir (toutf8 + tablesgen + toutf8 ) add_component_dir(esm attr common defs esmcommon records util luascripts format refid esmbridge esmterrain diff --git a/components/esm3/esmreader.hpp b/components/esm3/esmreader.hpp index 5af5e75573..9bae5f217e 100644 --- a/components/esm3/esmreader.hpp +++ b/components/esm3/esmreader.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include #include "components/esm/decompose.hpp" #include "components/esm/esmcommon.hpp" diff --git a/components/esm3/esmwriter.cpp b/components/esm3/esmwriter.cpp index 47c861e3ca..8bae844585 100644 --- a/components/esm3/esmwriter.cpp +++ b/components/esm3/esmwriter.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include "formatversion.hpp" diff --git a/components/esm4/reader.cpp b/components/esm4/reader.cpp index 505922601d..43a9e26418 100644 --- a/components/esm4/reader.cpp +++ b/components/esm4/reader.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include "grouptype.hpp" diff --git a/components/fontloader/fontloader.hpp b/components/fontloader/fontloader.hpp index 7e9220d58d..e5705f6af1 100644 --- a/components/fontloader/fontloader.hpp +++ b/components/fontloader/fontloader.hpp @@ -5,7 +5,7 @@ #include #include -#include +#include namespace VFS { diff --git a/components/nif/nifstream.cpp b/components/nif/nifstream.cpp index ef63bae937..6c361401e8 100644 --- a/components/nif/nifstream.cpp +++ b/components/nif/nifstream.cpp @@ -2,9 +2,9 @@ #include -#include "niffile.hpp" +#include -#include "../to_utf8/to_utf8.hpp" +#include "niffile.hpp" namespace { diff --git a/components/to_utf8/.gitignore b/components/to_utf8/.gitignore deleted file mode 100644 index 4e0357749e..0000000000 --- a/components/to_utf8/.gitignore +++ /dev/null @@ -1 +0,0 @@ -gen_iconv diff --git a/components/to_utf8/Makefile b/components/to_utf8/Makefile deleted file mode 100644 index 5234d455ae..0000000000 --- a/components/to_utf8/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -tables_gen.hpp: gen_iconv - ./gen_iconv > tables_gen.hpp - -gen_iconv: gen_iconv.cpp - g++ -Wall $^ -o $@ - -clean: - rm -f ./gen_iconv \ No newline at end of file diff --git a/components/toutf8/.gitignore b/components/toutf8/.gitignore new file mode 100644 index 0000000000..f1f54f5aea --- /dev/null +++ b/components/toutf8/.gitignore @@ -0,0 +1 @@ +geniconv diff --git a/components/toutf8/Makefile b/components/toutf8/Makefile new file mode 100644 index 0000000000..e46176d3ed --- /dev/null +++ b/components/toutf8/Makefile @@ -0,0 +1,8 @@ +tablesgen.hpp: geniconv + ./geniconv > tablesgen.hpp + +geniconv: geniconv.cpp + g++ -Wall $^ -o $@ + +clean: + rm -f ./geniconv diff --git a/components/to_utf8/gen_iconv.cpp b/components/toutf8/geniconv.cpp similarity index 95% rename from components/to_utf8/gen_iconv.cpp rename to components/toutf8/geniconv.cpp index 062b1173fc..48a7fb4627 100644 --- a/components/to_utf8/gen_iconv.cpp +++ b/components/toutf8/geniconv.cpp @@ -1,4 +1,4 @@ -// This program generates the file tables_gen.hpp +// This program generates the file tablesgen.hpp #include @@ -88,7 +88,7 @@ int write_table(const std::string& charset, const std::string& tableName) int main() { // Write header guard - std::cout << "#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H\n#define COMPONENTS_TOUTF8_TABLE_GEN_H\n\n"; + std::cout << "#ifndef OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP\n#define OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP\n\n"; // Write namespace std::cout << "namespace ToUTF8\n{\n\n"; diff --git a/components/to_utf8/tables_gen.hpp b/components/toutf8/tablesgen.hpp similarity index 99% rename from components/to_utf8/tables_gen.hpp rename to components/toutf8/tablesgen.hpp index b25bb54bab..9ef5097ece 100644 --- a/components/to_utf8/tables_gen.hpp +++ b/components/toutf8/tablesgen.hpp @@ -1,5 +1,5 @@ -#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H -#define COMPONENTS_TOUTF8_TABLE_GEN_H +#ifndef OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP +#define OPENMW_COMPONENTS_TOUTF8_TABLESGEN_HPP namespace ToUTF8 { diff --git a/components/to_utf8/to_utf8.cpp b/components/toutf8/toutf8.cpp similarity index 99% rename from components/to_utf8/to_utf8.cpp rename to components/toutf8/toutf8.cpp index 15fb8b26c0..e9b2a7fe2f 100644 --- a/components/to_utf8/to_utf8.cpp +++ b/components/toutf8/toutf8.cpp @@ -1,4 +1,4 @@ -#include "to_utf8.hpp" +#include "toutf8.hpp" #include #include @@ -41,7 +41,7 @@ */ // Generated tables -#include "tables_gen.hpp" +#include "tablesgen.hpp" using namespace ToUTF8; diff --git a/components/to_utf8/to_utf8.hpp b/components/toutf8/toutf8.hpp similarity index 97% rename from components/to_utf8/to_utf8.hpp rename to components/toutf8/toutf8.hpp index 80af6586c9..1da4ebffbb 100644 --- a/components/to_utf8/to_utf8.hpp +++ b/components/toutf8/toutf8.hpp @@ -1,5 +1,5 @@ -#ifndef COMPONENTS_TOUTF8_H -#define COMPONENTS_TOUTF8_H +#ifndef OPENMW_COMPONENTS_TOUTF8_TOUTF8_HPP +#define OPENMW_COMPONENTS_TOUTF8_TOUTF8_HPP #include #include diff --git a/components/translation/translation.hpp b/components/translation/translation.hpp index a7b6087ac7..18e40713e5 100644 --- a/components/translation/translation.hpp +++ b/components/translation/translation.hpp @@ -2,7 +2,7 @@ #define COMPONENTS_TRANSLATION_DATA_H #include -#include +#include namespace Translation {