emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117750: * lisp.h (str_collate):


From: Michael Albinus
Subject: [Emacs-diffs] trunk r117750: * lisp.h (str_collate):
Date: Wed, 27 Aug 2014 11:22:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117750
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Wed 2014-08-27 13:22:37 +0200
message:
  * lisp.h (str_collate):
  * sysdep.c (str_collate): Return int.
  (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/lisp.h                     lisp.h-20091113204419-o5vbwnq5f7feedwu-253
  src/sysdep.c                   sysdep.c-20091113204419-o5vbwnq5f7feedwu-448
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-08-27 10:51:21 +0000
+++ b/src/ChangeLog     2014-08-27 11:22:37 +0000
@@ -1,3 +1,9 @@
+2014-08-27  Michael Albinus  <address@hidden>
+
+       * lisp.h (str_collate):
+       * sysdep.c (str_collate): Return int.
+       (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
+
 2014-08-27  Dmitry Antipov  <address@hidden>
 
        Fix some glitches in previous change.

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2014-08-26 06:25:59 +0000
+++ b/src/lisp.h        2014-08-27 11:22:37 +0000
@@ -4298,7 +4298,7 @@
 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);

=== modified file 'src/sysdep.c'
--- a/src/sysdep.c      2014-08-27 04:15:20 +0000
+++ b/src/sysdep.c      2014-08-27 11:22:37 +0000
@@ -3606,7 +3606,7 @@
 #  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 @@
 #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 @@
 #endif /* __STDC_ISO_10646__ */
 
 #ifdef WINDOWSNT
-ptrdiff_t
+int
 str_collate (Lisp_Object s1, Lisp_Object s2)
 {
   Lisp_Object lc_collate =


reply via email to

[Prev in Thread] Current Thread [Next in Thread]