X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fi18n.h;h=d41ef1ef2c80046f15d84404db542a038e072c5a;hb=5cc8d996ceb67400912b46199ae658cdfbfea180;hp=ea16cfe0fa98dc01db0440e2f4d4cfe85863fd8a;hpb=96994a54e60e9c95b8bba54c2281acf7059b1203;p=pspp diff --git a/src/libpspp/i18n.h b/src/libpspp/i18n.h index ea16cfe0fa..d41ef1ef2c 100644 --- a/src/libpspp/i18n.h +++ b/src/libpspp/i18n.h @@ -18,6 +18,7 @@ #define I18N_H #include "libpspp/compiler.h" +#include "libpspp/str.h" #include #include @@ -58,6 +59,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); @@ -74,7 +78,10 @@ const char *uc_name (ucs4_t uc, char buffer[16]); unsigned int utf8_hash_case_bytes (const char *, size_t n, unsigned int basis) WARN_UNUSED_RESULT; unsigned int utf8_hash_case_string (const char *, unsigned int basis) WARN_UNUSED_RESULT; +unsigned int utf8_hash_case_substring (struct substring, unsigned int basis) + WARN_UNUSED_RESULT; int utf8_strcasecmp (const char *, const char *); +int utf8_sscasecmp (struct substring, struct substring); int utf8_strncasecmp (const char *, size_t, const char *, size_t); int utf8_strverscasecmp (const char *, const char *); char *utf8_to_upper (const char *); @@ -169,4 +176,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 */