mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 02:16:31 +00:00
spell: towupper(),towlower() are not called
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <wchar.h> // for towupper() and towlower()
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
|
@@ -261,20 +261,15 @@ typedef struct trystate_S {
|
|||||||
// Use our own character-case definitions, because the current locale may
|
// Use our own character-case definitions, because the current locale may
|
||||||
// differ from what the .spl file uses.
|
// differ from what the .spl file uses.
|
||||||
// These must not be called with negative number!
|
// These must not be called with negative number!
|
||||||
#include <wchar.h> // for towupper() and towlower()
|
|
||||||
// Multi-byte implementation. For Unicode we can call utf_*(), but don't do
|
// Multi-byte implementation. For Unicode we can call utf_*(), but don't do
|
||||||
// that for ASCII, because we don't want to use 'casemap' here. Otherwise use
|
// that for ASCII, because we don't want to use 'casemap' here. Otherwise use
|
||||||
// the "w" library function for characters above 255.
|
// the "w" library function for characters above 255.
|
||||||
#define SPELL_TOFOLD(c) ((c) >= 128 ? utf_fold(c) \
|
#define SPELL_TOFOLD(c) ((c) >= 128 ? utf_fold(c) : (int)spelltab.st_fold[c])
|
||||||
: (c) < \
|
|
||||||
256 ? (int)spelltab.st_fold[c] : (int)towlower(c))
|
|
||||||
|
|
||||||
#define SPELL_TOUPPER(c) ((c) >= 128 ? mb_toupper(c) \
|
#define SPELL_TOUPPER(c) ((c) >= 128 ? mb_toupper(c) \
|
||||||
: (c) < \
|
: (int)spelltab.st_upper[c])
|
||||||
256 ? (int)spelltab.st_upper[c] : (int)towupper(c))
|
|
||||||
|
|
||||||
#define SPELL_ISUPPER(c) ((c) >= 128 ? mb_isupper(c) \
|
#define SPELL_ISUPPER(c) ((c) >= 128 ? mb_isupper(c) : spelltab.st_isu[c])
|
||||||
: (c) < 256 ? spelltab.st_isu[c] : iswupper(c))
|
|
||||||
|
|
||||||
// First language that is loaded, start of the linked list of loaded
|
// First language that is loaded, start of the linked list of loaded
|
||||||
// languages.
|
// languages.
|
||||||
|
Reference in New Issue
Block a user