From d9e24098b5b3cf5d34994455a7d736f7262f70c4 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 29 Oct 2012 16:09:32 -0400 Subject: [PATCH] C -> C++ - Integrated wcwidth6.c more into text.cpp. - Moved wcwidth6.c to wcwidth6.cpp, to cure some strange build issue. --- src/CMakeLists.txt | 2 +- src/text.cpp | 1 - src/text.h | 2 ++ src/{wcwidth6.c => wcwidth6.cpp} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename src/{wcwidth6.c => wcwidth6.cpp} (100%) 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