Commit 17d94f1b authored by Michael Albinus's avatar Michael Albinus

* lisp.h (str_collate):

* sysdep.c (str_collate): Return int.
(str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
parent 28e0124d
2014-08-27 Michael Albinus <michael.albinus@gmx.de>
* lisp.h (str_collate):
* sysdep.c (str_collate): Return int.
(str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
Fix some glitches in previous change.
......
......@@ -4298,7 +4298,7 @@ extern void lock_file (Lisp_Object);
extern void unlock_file (Lisp_Object);
extern void unlock_buffer (struct buffer *);
extern void syms_of_filelock (void);
extern ptrdiff_t str_collate (Lisp_Object, Lisp_Object);
extern int str_collate (Lisp_Object, Lisp_Object);
/* Defined in sound.c. */
extern void syms_of_sound (void);
......
......@@ -3606,7 +3606,7 @@ system_process_attributes (Lisp_Object pid)
# define setlocale(category, locale) ((char *) 0)
# endif
ptrdiff_t
int
str_collate (Lisp_Object s1, Lisp_Object s2)
{
ptrdiff_t res, len, i, i_byte;
......@@ -3653,7 +3653,10 @@ str_collate (Lisp_Object s1, Lisp_Object s2)
#endif
}
errno = 0;
res = wcscoll (p1, p2);
if (errno)
error ("Wrong argument: %s", strerror (errno));
#ifdef HAVE_USELOCALE
/* Free the locale object, and reset. */
......@@ -3674,7 +3677,7 @@ str_collate (Lisp_Object s1, Lisp_Object s2)
#endif /* __STDC_ISO_10646__ */
#ifdef WINDOWSNT
ptrdiff_t
int
str_collate (Lisp_Object s1, Lisp_Object s2)
{
Lisp_Object lc_collate =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment