ALT Linux Bugzilla
– Attachment 1204 Details for
Bug 8305
readline работает неправильно с не-ascii вводом
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Patch by Aleksey Cheusov
readline-nonascii-input.patch (text/plain), 2.35 KB, created by
Kirill A. Shutemov
on 2005-10-20 17:02:20 MSD
(
hide
)
Description:
Patch by Aleksey Cheusov
Filename:
MIME Type:
Creator:
Kirill A. Shutemov
Created:
2005-10-20 17:02:20 MSD
Size:
2.35 KB
patch
obsolete
>diff -uNr readline-4.3.orig/chardefs.h readline-4.3/chardefs.h >--- readline-4.3.orig/chardefs.h 2002-02-14 18:38:18 +0200 >+++ readline-4.3/chardefs.h 2005-10-20 11:45:25 +0300 >@@ -24,6 +24,7 @@ > #define _CHARDEFS_H_ > > #include <ctype.h> >+#include "rlmbutil.h" > > #if defined (HAVE_CONFIG_H) > # if defined (HAVE_STRING_H) >@@ -82,24 +83,24 @@ > /* Some systems define these; we want our definitions. */ > #undef ISPRINT > >-#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) >-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) >-#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) >-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) >-#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) >-#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) >-#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) >+#define ISALNUM(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isalnum ((unsigned char) c)) >+#define ISALPHA(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isalpha ((unsigned char) c)) >+#define ISDIGIT(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isdigit ((unsigned char) c)) >+#define ISLOWER(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && islower ((unsigned char) c)) >+#define ISPRINT(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isprint ((unsigned char) c)) >+#define ISUPPER(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isupper ((unsigned char) c)) >+#define ISXDIGIT(c) ((MB_CUR_MAX == 1 || IN_CTYPE_DOMAIN (c)) && isxdigit ((unsigned char) c)) > >-#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) >-#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) >+#define _rl_lowercase_p(c) (ISLOWER(c)) >+#define _rl_uppercase_p(c) (ISUPPER(c)) > #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') > >-#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) >-#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) >+#define _rl_pure_alphabetic(c) (ISALPHA(c)) >+#define ALPHABETIC(c) (ISALNUM(c)) > > #ifndef _rl_to_upper >-# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) >-# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) >+# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : ((unsigned char) c)) >+# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : ((unsigned char) c)) > #endif > > #ifndef _rl_digit_value
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8305
: 1204