summaryrefslogtreecommitdiff
path: root/ncurses/widechar/widechars.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/widechar/widechars.c')
-rw-r--r--ncurses/widechar/widechars.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ncurses/widechar/widechars.c b/ncurses/widechar/widechars.c
index d05ba98a8265..6ea008ddad65 100644
--- a/ncurses/widechar/widechars.c
+++ b/ncurses/widechar/widechars.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2024,2025 Thomas E. Dickey *
* Copyright 2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -31,9 +31,9 @@
#if USE_WIDEC_SUPPORT
-MODULE_ID("$Id: widechars.c,v 1.9 2020/08/29 16:22:03 juergen Exp $")
+MODULE_ID("$Id: widechars.c,v 1.11 2025/02/20 01:02:09 tom Exp $")
-#if (defined(_NC_WINDOWS)) && !defined(_NC_MSC)
+#if defined(_NC_MINGW)
/*
* MinGW has wide-character functions, but they do not work correctly.
*/
@@ -45,7 +45,7 @@ _nc_mbtowc(wchar_t *pwc, const char *s, size_t n)
int count;
int try;
- if (s != 0 && n != 0) {
+ if (s != NULL && n != 0) {
/*
* MultiByteToWideChar() can decide to return more than one
* wide-character. We want only one. Ignore any trailing null, both
@@ -96,7 +96,7 @@ _nc_mblen(const char *s, size_t n)
int count;
wchar_t temp;
- if (s != 0 && n != 0) {
+ if (s != NULL && n != 0) {
count = _nc_mbtowc(&temp, s, n);
if (count == 1) {
int check = WideCharToMultiByte(CP_UTF8,
@@ -148,6 +148,6 @@ _nc_wctomb(char *s, wchar_t wc)
return result;
}
-#endif /* _NC_WINDOWS */
+#endif /* _NC_MINGW */
#endif /* USE_WIDEC_SUPPORT */