aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ascii.h
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2021-06-03 02:45:36 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-11 15:36:04 +0100
commit26733dd488874fee8dfc70d54167f427d5f50516 (patch)
tree710415ca40a05bd41cacbe0bb6fcc1031d911d8a /src/nvim/ascii.h
parent90a4cf92d21b730fea7099fb3e12a9ef791a1a57 (diff)
downloadrneovim-26733dd488874fee8dfc70d54167f427d5f50516.tar.gz
rneovim-26733dd488874fee8dfc70d54167f427d5f50516.tar.bz2
rneovim-26733dd488874fee8dfc70d54167f427d5f50516.zip
vim-patch:8.2.2309: 0o777 not recognized as octal
Problem: 0o777 not recognized as octal. Solution: Use vim_isodigit(). (Ken Takata, closes vim/vim#7633, closes vim/vim#7631) https://github.com/vim/vim/commit/c37b655443e0a11a77a9f0707e3259ab4b8b3dda :scriptversion is N/A.
Diffstat (limited to 'src/nvim/ascii.h')
-rw-r--r--src/nvim/ascii.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/ascii.h b/src/nvim/ascii.h
index f41068ea70..7b5e82cd3f 100644
--- a/src/nvim/ascii.h
+++ b/src/nvim/ascii.h
@@ -169,6 +169,14 @@ static inline bool ascii_isbdigit(int c)
return (c == '0' || c == '1');
}
+/// Checks if `c` is an octal digit, that is, 0-7.
+///
+/// @see {ascii_isdigit}
+static inline bool ascii_isodigit(int c)
+{
+ return (c >= '0' && c <= '7');
+}
+
/// Checks if `c` is a white-space character, that is,
/// one of \f, \n, \r, \t, \v.
///