diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2005-06-02 22:50:02 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2005-06-02 22:50:02 -0400 |
commit | 1367261dc669476df3a799f0de45e4bfb2437b8b (patch) | |
tree | 3bf6e1c020aab95b4133f2c29baffef454d3d60b /src/LYStrings.c | |
parent | aaa10562f4a02971f712964cb2fd1014d2a75d33 (diff) | |
download | lynx-snapshots-1367261dc669476df3a799f0de45e4bfb2437b8b.tar.gz |
snapshot of project "lynx", label v2-8-6dev_12
Diffstat (limited to 'src/LYStrings.c')
-rw-r--r-- | src/LYStrings.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/LYStrings.c b/src/LYStrings.c index ec12ea65..4fe7be02 100644 --- a/src/LYStrings.c +++ b/src/LYStrings.c @@ -827,9 +827,21 @@ void ena_csi(BOOLEAN flag) #ifdef USE_SLANG #define define_key(string, code) \ - SLkm_define_keysym (string, code, Keymap_List) + SLkm_define_keysym ((char*)(string), code, Keymap_List) +#if SLANG_VERSION < 20000 #define expand_substring(dst, first, last, final) \ - (SLexpand_escaped_string(dst, (char *)first, (char *)last), 1) + (SLexpand_escaped_string(dst, (char *)first, (char *)last), 1) +static int SLang_get_error(void) +{ + return SLang_Error; +} +#else +int LY_Slang_UTF8_Mode = 0; + +#define expand_substring(dst, first, last, final) \ + (SLexpand_escaped_string(dst, (char *)first, (char *)last, LY_Slang_UTF8_Mode), 1) +#endif + static SLKeyMap_List_Type *Keymap_List; /* This value should be larger than anything in LYStrings.h */ @@ -1248,7 +1260,7 @@ static int unsetkey_cmd(char *parse) * occasionally find useful). */ SLang_undefine_key(parse, Keymap_List); - if (SLang_Error) + if (SLang_get_error()) return -1; #endif } @@ -1391,7 +1403,7 @@ int lynx_initialize_keymaps(void) setup_vtXXX_keymap(); define_key("\033[M", MOUSE_KEYSYM); - if (SLang_Error) + if (SLang_get_error()) SLang_exit_error("Unable to initialize keymaps"); #else setup_vtXXX_keymap(); |