diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0cd366503..b6d4b35cd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,7 @@ set (task_SRCS A3.cpp A3.h text.cpp text.h utf8.cpp utf8.h util.cpp util.h - wcwidth6.c) + wcwidth6.cpp) add_library (task STATIC ${task_SRCS}) add_executable (task_executable main.cpp) diff --git a/src/text.cpp b/src/text.cpp index 6713490a4..aff701ab8 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -48,7 +48,6 @@ static const char* newline = "\n"; static const char* noline = ""; static void replace_positional (std::string&, const std::string&, const std::string&); -extern "C" int mk_wcwidth (wchar_t); /////////////////////////////////////////////////////////////////////////////// void wrapText ( diff --git a/src/text.h b/src/text.h index 1127c8063..cf90dbfc0 100644 --- a/src/text.h +++ b/src/text.h @@ -91,5 +91,7 @@ std::string rightJustifyZero (const int, const int); std::string rightJustify (const int, const int); std::string rightJustify (const std::string&, const int); +int mk_wcwidth (wchar_t); + #endif //////////////////////////////////////////////////////////////////////////////// diff --git a/src/wcwidth6.c b/src/wcwidth6.cpp similarity index 100% rename from src/wcwidth6.c rename to src/wcwidth6.cpp