Delete document about Emchar accessors.
[chise/xemacs-chise.git] / src / buffer.h
index 55a7514..6ca50c7 100644 (file)
@@ -32,15 +32,12 @@ Boston, MA 02111-1307, USA.  */
 #ifndef _XEMACS_BUFFER_H_
 #define _XEMACS_BUFFER_H_
 
-#ifdef MULE
 #include "character.h"
 
 #ifdef UTF2000
 #include "mb-utf-8.h"
 #endif
 
-#endif
-
 /************************************************************************/
 /*                                                                      */
 /*                    definition of Lisp buffer object                  */
@@ -348,6 +345,9 @@ for (mps_bufcons = Qunbound,                                                        \
        Return a pointer to the beginning of the character offset N
        (in characters) from PTR.
 
+   MAX_EMCHAR_LEN:
+       Maximum number of buffer bytes per Emacs character.
+
 
    (C) For retrieving or changing the character pointed to by a charptr:
    ---------------------------------------------------------------------
@@ -367,28 +367,6 @@ for (mps_bufcons = Qunbound,                                                       \
        Retrieve the character pointed to by PTR and store it as
        internally-formatted text in PTR2.
 
-
-   (D) For working with Emchars:
-   -----------------------------
-
-   [Note that there are other functions/macros for working with Emchars
-    in mule-charset.h, for retrieving the charset of an Emchar
-    and such.  These are only valid when MULE is defined.]
-
-   valid_char_p (ch):
-       Return whether the given Emchar is valid.
-
-   CHARP (ch):
-       Return whether the given Lisp_Object is a character.
-
-   CHECK_CHAR_COERCE_INT (ch):
-       Signal an error if CH is not a valid character or integer Lisp_Object.
-       If CH is an integer Lisp_Object, convert it to a character Lisp_Object,
-       but merely by repackaging, without performing tests for char validity.
-
-   MAX_EMCHAR_LEN:
-       Maximum number of buffer bytes per Emacs character.
-
 */
 
 
@@ -487,6 +465,16 @@ charptr_n_addr (CONST Bufbyte *ptr, Charcount offset)
   return ptr + charcount_to_bytecount (ptr, offset);
 }
 
+#ifdef UTF2000
+# define MAX_EMCHAR_LEN 6
+#else
+#ifdef MULE
+# define MAX_EMCHAR_LEN 4
+#else
+# define MAX_EMCHAR_LEN 1
+#endif
+#endif
+
 /* -------------------------------------------------------------------- */
 /* (C) For retrieving or changing the character pointed to by a charptr */
 /* -------------------------------------------------------------------- */
@@ -539,71 +527,6 @@ charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2)
 #define charptr_emchar_n(ptr, offset) \
   charptr_emchar (charptr_n_addr (ptr, offset))
 
-
-/* ---------------------------- */
-/* (D) For working with Emchars */
-/* ---------------------------- */
-
-#ifdef MULE
-
-#ifdef UTF2000
-#define valid_char_p(ch) 1
-#else
-int non_ascii_valid_char_p (Emchar ch);
-
-INLINE int valid_char_p (Emchar ch);
-INLINE int
-valid_char_p (Emchar ch)
-{
-  return ((unsigned int) (ch) <= 0xff) || non_ascii_valid_char_p (ch);
-}
-#endif
-
-#else /* not MULE */
-
-#define valid_char_p(ch) ((unsigned int) (ch) <= 0xff)
-
-#endif /* not MULE */
-
-#define CHAR_INTP(x) (INTP (x) && valid_char_p (XINT (x)))
-
-#define CHAR_OR_CHAR_INTP(x) (CHARP (x) || CHAR_INTP (x))
-
-#ifdef ERROR_CHECK_TYPECHECK
-
-INLINE Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj);
-INLINE Emchar
-XCHAR_OR_CHAR_INT (Lisp_Object obj)
-{
-  assert (CHAR_OR_CHAR_INTP (obj));
-  return CHARP (obj) ? XCHAR (obj) : XINT (obj);
-}
-
-#else
-
-#define XCHAR_OR_CHAR_INT(obj) (CHARP ((obj)) ? XCHAR ((obj)) : XINT ((obj)))
-
-#endif
-
-#define CHECK_CHAR_COERCE_INT(x) do {          \
-  if (CHARP (x))                               \
-     ;                                         \
-  else if (CHAR_INTP (x))                      \
-    x = make_char (XINT (x));                  \
-  else                                         \
-    x = wrong_type_argument (Qcharacterp, x);  \
-} while (0)
-
-#ifdef UTF2000
-# define MAX_EMCHAR_LEN 6
-#else
-#ifdef MULE
-# define MAX_EMCHAR_LEN 4
-#else
-# define MAX_EMCHAR_LEN 1
-#endif
-#endif
-
 \f
 /*----------------------------------------------------------------------*/
 /*         Accessor macros for important positions in a buffer         */