summaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 19:28:31 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2017-09-17 19:46:06 +0200
commit9b7cfb7c8d8d337554ad7c5995ce75fac52c7d54 (patch)
treed2984feb328e1c2a05c80c75d1dd8032dafbb95b /src/editor.h
parent997bb3428312779a6f5af0264fa772407184ec17 (diff)
downloadratpoison-9b7cfb7c8d8d337554ad7c5995ce75fac52c7d54.zip
Move utf8_locale to its own file
So that we can easily use it from tests.
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/editor.h b/src/editor.h
index 445cd82..be79b6c 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -21,6 +21,7 @@
#ifndef _RATPOISON_EDITOR_H
#define _RATPOISON_EDITOR_H 1
+#include "utf8.h"
typedef enum edit_status
{
@@ -34,9 +35,9 @@ typedef enum edit_status
} edit_status;
/* UTF-8 handling macros */
-#define RP_IS_UTF8_CHAR(c) (defaults.utf8_locale && (c) & 0xC0)
-#define RP_IS_UTF8_START(c) (defaults.utf8_locale && ((c) & 0xC0) == 0xC0)
-#define RP_IS_UTF8_CONT(c) (defaults.utf8_locale && ((c) & 0xC0) == 0x80)
+#define RP_IS_UTF8_CHAR(c) (utf8_locale && (c) & 0xC0)
+#define RP_IS_UTF8_START(c) (utf8_locale && ((c) & 0xC0) == 0xC0)
+#define RP_IS_UTF8_CONT(c) (utf8_locale && ((c) & 0xC0) == 0x80)
/* Input line functions */
rp_input_line *input_line_new (char *prompt, char *preinput, int history_id, enum completion_styles style, completion_fn fn);