aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/vim.h
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-06-02 09:41:10 +0900
committererw7 <erw7.github@gmail.com>2019-06-09 13:28:10 +0900
commit6fad1736fbe369d92afd88fb14ef637366bc5e77 (patch)
treefd403b7004ac4bee8f9318f524703c8b090e00d7 /src/nvim/vim.h
parent53551d823e2a4cc7fa7dc9f9027c21f23b08aeab (diff)
downloadrneovim-6fad1736fbe369d92afd88fb14ef637366bc5e77.tar.gz
rneovim-6fad1736fbe369d92afd88fb14ef637366bc5e77.tar.bz2
rneovim-6fad1736fbe369d92afd88fb14ef637366bc5e77.zip
Change mch_errmsg and mch_msg from macro to function
Diffstat (limited to 'src/nvim/vim.h')
-rw-r--r--src/nvim/vim.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index d74427ef26..5261d266b2 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -35,10 +35,6 @@ enum { NUMBUFLEN = 65 };
#include "nvim/gettext.h"
-#ifdef WIN32
-# include "nvim/mbyte.h" // for utf8_to_utf16
-#endif
-
// special attribute addition: Put message in history
#define MSG_HIST 0x1000
@@ -291,30 +287,7 @@ enum { FOLD_TEXT_LEN = 51 }; //!< buffer size for get_foldtext()
// functions of these names. The declarations would break if the defines had
// been seen at that stage. But it must be before globals.h, where error_ga
// is declared.
-#ifdef WIN32
-# define mch_errmsg(str) \
- do { \
- wchar_t *utf16str; \
- int conversion_result = utf8_to_utf16((str), &utf16str); \
- if (conversion_result != 0) { \
- EMSG2("utf8_to_utf16 failed: %d", conversion_result); \
- } else { \
- fwprintf(stderr, L"%ls", utf16str); \
- xfree(utf16str); \
- } \
- } while (0)
-# define mch_msg(str) \
- do { \
- wchar_t *utf16str; \
- int conversion_result = utf8_to_utf16((str), &utf16str); \
- if (conversion_result != 0) { \
- EMSG2("utf8_to_utf16 failed: %d", conversion_result); \
- } else { \
- wprintf(L"%ls", utf16str); \
- xfree(utf16str); \
- } \
- } while (0)
-#else
+#ifndef WIN32
# define mch_errmsg(str) fprintf(stderr, "%s", (str))
# define mch_msg(str) printf("%s", (str))
#endif