summaryrefslogtreecommitdiff
path: root/Src/Zle/comp.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-11-15 21:27:45 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-11-15 21:27:45 +0000
commit85c513894d42293c79b46f09a039162329698656 (patch)
treee4cb108ebd22c4e7420cb6baf9cf9f59018c29c8 /Src/Zle/comp.h
parentac38534728b2980d1e4b3422453322546b975062 (diff)
downloadzsh-85c513894d42293c79b46f09a039162329698656.tar.gz
zsh-85c513894d42293c79b46f09a039162329698656.zip
26047: convert lower levels of completion matching to use
multibyte strings and wide characters
Diffstat (limited to 'Src/Zle/comp.h')
-rw-r--r--Src/Zle/comp.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/Src/Zle/comp.h b/Src/Zle/comp.h
index 7ac051c25..e96c4217c 100644
--- a/Src/Zle/comp.h
+++ b/Src/Zle/comp.h
@@ -190,10 +190,7 @@ struct cpattern {
* Note the allocated length may be longer
* than the null-terminated string.
*/
- int chr; /* if a single character, it
- * TODO: eventually should be a
- * convchar_t.
- */
+ convchar_t chr; /* if a single character, it */
} u;
};
@@ -201,9 +198,17 @@ struct cpattern {
* For now this just handles single-byte characters.
* TODO: this will change.
*/
+#ifdef MULTIBYTE_SUPPORT
+#define PATMATCHRANGE(r, c, ip, mtp) mb_patmatchrange(r, c, ip, mtp)
+#define PATMATCHINDEX(r, i, cp, mtp) mb_patmatchindex(r, i, cp, mtp)
+#define CONVCAST(c) ((wchar_t)(c))
+#define CHR_INVALID (WEOF)
+#else
#define PATMATCHRANGE(r, c, ip, mtp) patmatchrange(r, c, ip, mtp)
#define PATMATCHINDEX(r, i, cp, mtp) patmatchindex(r, i, cp, mtp)
-#define CONVCAST(c) (c)
+#define CONVCAST(c) (c)
+#define CHR_INVALID (-1)
+#endif
/* This is a special return value for parse_cmatcher(), *
* signalling an error. */