From 4b548c10285d80b8781e5572c5cbd706d6c1fe91 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Mon, 22 Nov 2021 20:10:39 -0500 Subject: Source: Fix -Wmissing-variable-declarations warning --- Source/cm_codecvt.cxx | 5 +---- Source/cm_utf8.h | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx index ddee968..8115306 100644 --- a/Source/cm_codecvt.cxx +++ b/Source/cm_codecvt.cxx @@ -9,11 +9,8 @@ # include # undef max # include "cmsys/Encoding.hxx" -#endif -#if defined(_WIN32) -/* Number of leading ones before a zero in the byte (see cm_utf8.c). */ -extern "C" unsigned char const cm_utf8_ones[256]; +# include "cm_utf8.h" #endif codecvt::codecvt(Encoding e) diff --git a/Source/cm_utf8.h b/Source/cm_utf8.h index fa9ed3a..67f3d3f 100644 --- a/Source/cm_utf8.h +++ b/Source/cm_utf8.h @@ -6,6 +6,8 @@ extern "C" { #endif +extern unsigned char const cm_utf8_ones[256]; + /** Decode one UTF-8 character from the input byte range. On success, stores the unicode character number in *pc and returns the first position not extracted. On failure, returns 0. */ -- cgit v0.12