diff options
author | Karl Ramm <kcr@1ts.org> | 2009-04-17 14:42:18 +0000 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2009-04-17 14:42:18 +0000 |
commit | 7c412165256f54ea5e499868d9ab48cd9f442147 (patch) | |
tree | 52123669b176dbadc889e71404134ff5df769a96 /lib/zephyr_tests.py | |
parent | 7dffd27e0267e0585c35c5f1b59497a1431501a3 (diff) |
More i18n infrastructure
lib/charset.c
h/zephyr/zephyr.h
Refactor ZGetCharset into ZGetCharset and a function that does
all the same defaulting but returns a string.
ZTransliterate is a zephyr-metaphor wrapper for iconv.
lib/zephyr-tests.py
Wrappers for the functions in charset.c (but not tests)
lib/zephyr_tests.txt
Tests for the functions in charset.c
Diffstat (limited to 'lib/zephyr_tests.py')
-rwxr-xr-x | lib/zephyr_tests.py | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/lib/zephyr_tests.py b/lib/zephyr_tests.py index 791dccc..e78e2a2 100755 --- a/lib/zephyr_tests.py +++ b/lib/zephyr_tests.py @@ -323,6 +323,10 @@ class libZephyr(object): "ZFormatNotice", "ZCompareUID", "ZExpandRealm", + "ZGetCharsetString", + "ZGetCharset", + "ZCharsetToString", + "ZTransliterate", "ZOpenPort", "ZClosePort", "ZMakeAscii", @@ -402,11 +406,48 @@ class libZephyr(object): c_char_p, # realm ] + # unsigned short + # ZGetCharset(char *charset) + self.ZGetCharset.restype = c_ushort + self.ZGetCharset.argtypes = [ + c_char_p, # charset + ] + + # const char * + # ZCharsetToString(unsigned short charset) + self.ZCharsetToString.restype = c_char_p + self.ZCharsetToString.argtypes = [ + c_ushort, # charset + ] + + # Code_t + # ZTransliterate(char *in, + # int inlen, + # char *inset, + # char *outset, + # char **out, + # int *outlen) + self.ZTransliterate.argtypes = [ + c_char_p, # in + c_int, # inlnet, + c_char_p, # inset + c_char_p, # outset + POINTER(c_char_p), # out + POINTER(c_int), # outlen + ] + # Code_t ZOpenPort(u_short *port) self.ZOpenPort.argtypes = [ POINTER(c_ushort), # port ] + # const char * + # ZGetCharsetString(char *charset) + self.ZGetCharsetString.restype = c_char_p + self.ZGetCharsetString.argtypes = [ + c_char_p, # charset + ] + # Code_t # ZMakeAscii(register char *ptr, # int len, |