summaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/editor.h b/src/editor.h
index f3ffa31..b6e4b76 100644
--- a/src/editor.h
+++ b/src/editor.h
@@ -35,6 +35,11 @@ edit_status
EDIT_NO_OP
};
+/* 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)
+
/* Input line functions */
rp_input_line *input_line_new (char *prompt, char *preinput, int history_id, completion_fn fn);
void input_line_free (rp_input_line *line);