aboutsummaryrefslogtreecommitdiffhomepage
path: root/fallback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fallback.cpp')
-rw-r--r--fallback.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/fallback.cpp b/fallback.cpp
index 5e4b3e1b..43b95435 100644
--- a/fallback.cpp
+++ b/fallback.cpp
@@ -16,7 +16,6 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <wchar.h>
@@ -33,6 +32,8 @@
#if HAVE_NCURSES_H
#include <ncurses.h>
+#elif HAVE_NCURSES_CURSES_H
+#include <ncurses/curses.h>
#else
#include <curses.h>
#endif
@@ -98,8 +99,6 @@ char *tparm_solaris_kludge(char *str, ...)
|| (enter_reverse_mode && ! strcmp(str, enter_reverse_mode))
|| (enter_shadow_mode && ! strcmp(str, enter_shadow_mode))
|| (exit_shadow_mode && ! strcmp(str, exit_shadow_mode))
- || (enter_standout_mode && ! strcmp(str, enter_standout_mode))
- || (exit_standout_mode && ! strcmp(str, exit_standout_mode))
|| (enter_secure_mode && ! strcmp(str, enter_secure_mode))
|| (enter_bold_mode && ! strcmp(str, enter_bold_mode)))
{
@@ -804,6 +803,7 @@ wchar_t *wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **save_ptr)
/* Fallback implementations of wcsdup and wcscasecmp. On systems where these are not needed (e.g. building on Linux) these should end up just being stripped, as they are static functions that are not referenced in this file.
*/
+__attribute__((unused))
static wchar_t *wcsdup_fallback(const wchar_t *in)
{
size_t len=wcslen(in);
@@ -817,6 +817,7 @@ static wchar_t *wcsdup_fallback(const wchar_t *in)
return out;
}
+__attribute__((unused))
static int wcscasecmp_fallback(const wchar_t *a, const wchar_t *b)
{
if (*a == 0)
@@ -834,6 +835,7 @@ static int wcscasecmp_fallback(const wchar_t *a, const wchar_t *b)
return wcscasecmp_fallback(a+1,b+1);
}
+__attribute__((unused))
static int wcsncasecmp_fallback(const wchar_t *a, const wchar_t *b, size_t count)
{
if (count == 0)
@@ -1508,7 +1510,7 @@ static int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
if (pwcs[i] == L'\0')
break;
-
+
int w = mk_wcwidth(pwcs[i]);
if (w < 0)
{