diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-12-06 12:51:55 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-12-06 12:51:55 +0000 |
| commit | 966ac90fe71f46c63efd370d4837b5ddf4ca7e10 (patch) | |
| tree | 7ca8593ad9c7c6eb490bbf02eb83bd51c640637a /src/buffer.hh | |
| parent | 39fffec104c7e9e65baa16c220e9fe4b4a2f56bc (diff) | |
Change eolformat and BOM options to be enums instead of strings
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index b91a7ed1..60820487 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -12,6 +12,34 @@ namespace Kakoune { +enum class EolFormat +{ + Lf, + Crlf +}; + +constexpr Array<EnumDesc<EolFormat>, 2> enum_desc(EolFormat) +{ + return { { + { EolFormat::Lf, "lf" }, + { EolFormat::Crlf, "crlf" }, + } }; +} + +enum class ByteOrderMark +{ + None, + Utf8 +}; + +constexpr Array<EnumDesc<ByteOrderMark>, 2> enum_desc(ByteOrderMark) +{ + return { { + { ByteOrderMark::None, "none" }, + { ByteOrderMark::Utf8, "utf8" }, + } }; +} + class Buffer; constexpr timespec InvalidTime = { -1, -1 }; |
