emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master f3fafd2: ; * src/coding.h (surrogates_to_codepoint)


From: Eli Zaretskii
Subject: [Emacs-diffs] master f3fafd2: ; * src/coding.h (surrogates_to_codepoint): Add prototype.
Date: Mon, 15 Jan 2018 07:16:30 -0500 (EST)

branch: master
commit f3fafd24175a8918996c824db17c670c13fb380d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    ; * src/coding.h (surrogates_to_codepoint): Add prototype.
---
 src/coding.h | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/coding.h b/src/coding.h
index d90b799..165c1b2 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -674,18 +674,6 @@ struct coding_system
 #define UTF_16_LOW_SURROGATE_P(val) \
   (((val) & 0xFC00) == 0xDC00)
 
-/* Return the Unicode code point for the given UTF-16 surrogates.  */
-
-INLINE int
-surrogates_to_codepoint (int low, int high)
-{
-  eassert (0 <= low && low <= 0xFFFF);
-  eassert (0 <= high && high <= 0xFFFF);
-  eassert (UTF_16_LOW_SURROGATE_P (low));
-  eassert (UTF_16_HIGH_SURROGATE_P (high));
-  return 0x10000 + (low - 0xDC00) + ((high - 0xD800) * 0x400);
-}
-
 /* Extern declarations.  */
 extern Lisp_Object code_conversion_save (bool, bool);
 extern bool encode_coding_utf_8 (struct coding_system *);
@@ -712,6 +700,8 @@ extern void decode_coding_object (struct coding_system *,
 extern void encode_coding_object (struct coding_system *,
                                   Lisp_Object, ptrdiff_t, ptrdiff_t,
                                   ptrdiff_t, ptrdiff_t, Lisp_Object);
+/* Defined in this file.  */
+INLINE int surrogates_to_codepoint (int, int);
 
 #if defined (WINDOWSNT) || defined (CYGWIN)
 
@@ -756,6 +746,18 @@ extern Lisp_Object from_unicode_buffer (const wchar_t 
*wstr);
   } while (false)
 
 
+/* Return the Unicode code point for the given UTF-16 surrogates.  */
+
+INLINE int
+surrogates_to_codepoint (int low, int high)
+{
+  eassert (0 <= low && low <= 0xFFFF);
+  eassert (0 <= high && high <= 0xFFFF);
+  eassert (UTF_16_LOW_SURROGATE_P (low));
+  eassert (UTF_16_HIGH_SURROGATE_P (high));
+  return 0x10000 + (low - 0xDC00) + ((high - 0xD800) * 0x400);
+}
+
 extern Lisp_Object preferred_coding_system (void);
 
 



reply via email to

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