lexer: Factor out functions for counting columns.
[pspp] / src / libpspp / i18n.h
index 0e77444bed2b69ce733d3e1c5f1d752e8e373419..3ae1e9e0b10456c679955ea999bcb64c39834c35 100644 (file)
@@ -58,6 +58,9 @@ char *utf8_encoding_concat (const char *head, const char *tail,
 size_t utf8_encoding_concat_len (const char *head, const char *tail,
                                  const char *encoding, size_t max_len);
 
+size_t utf8_count_columns (const char *, size_t);
+size_t utf8_columns_to_bytes (const char *, size_t, size_t n_columns);
+
 char *utf8_to_filename (const char *filename);
 char *filename_to_utf8 (const char *filename);
 
@@ -92,7 +95,7 @@ char *utf8_to_title (const char *);
        a b c d e f g h i j k l m
        n o p q r s t u v w x y z
        0 1 2 3 4 5 6 7 8 9
-       ! " # % & ' ( ) * + , - . / :
+       ! " # % & ' () * + , - . / :
        ; < = > ? [ \ ] ^ _ { | } ~
        space \a \b \r \n \t \v \f \0
 
@@ -169,4 +172,8 @@ struct encoding_category
 struct encoding_category *get_encoding_categories (void);
 size_t get_n_encoding_categories (void);
 
+/* Return the ISO two letter code for the current LC_MESSAGES
+   locale category.  */
+char *get_language (void);
+
 #endif /* i18n.h */