From: tomo Date: Sun, 5 Sep 1999 14:04:41 +0000 (+0000) Subject: (BYTE_ASCII_P): Moved from char-ucs.h. X-Git-Tag: r21-2-19-utf-2000-0_6-0~7 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=47733ea6e26ac34a9cd5b980c74774ef2a4c5a63;p=chise%2Fxemacs-chise.git- (BYTE_ASCII_P): Moved from char-ucs.h. (BYTE_C0_P): Likewise. (BYTE_C1_P): Likewise. (Lstream_get_emchar_1): Likewise. (Lstream_fput_emchar): Likewise. (Lstream_funget_emchar): Likewise. (copy_internal_to_external): Likewise. (copy_external_to_internal): Likewise. --- diff --git a/src/mb-multibyte.h b/src/mb-multibyte.h index 69f137c..138b320 100644 --- a/src/mb-multibyte.h +++ b/src/mb-multibyte.h @@ -24,6 +24,20 @@ Boston, MA 02111-1307, USA. */ #ifndef _XEMACS_MB_MULTIBYTE_H #define _XEMACS_MB_MULTIBYTE_H +/************************************************************************/ +/* Operations on individual bytes */ +/* of any format */ +/************************************************************************/ + +/* Argument `c' should be (unsigned int) or (unsigned char). */ +/* Note that SP and DEL are not included. */ + +#define BYTE_ASCII_P(c) ((c) < 0x80) +#define BYTE_C0_P(c) ((c) < 0x20) +/* Do some forced casting just to make *sure* things are gotten right. */ +#define BYTE_C1_P(c) ((unsigned int) ((unsigned int) (c) - 0x80) < 0x20) + + /* ---------------------------------------------------------------------- */ /* (A) For working with charptr's (pointers to internally-formatted text) */ /* ---------------------------------------------------------------------- */ @@ -86,4 +100,18 @@ charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *ptr2) non_ascii_charptr_copy_char (ptr, ptr2); } + +/************************************************************************/ +/* Exported functions */ +/************************************************************************/ + +Emchar Lstream_get_emchar_1 (Lstream *stream, int first_char); +int Lstream_fput_emchar (Lstream *stream, Emchar ch); +void Lstream_funget_emchar (Lstream *stream, Emchar ch); + +int copy_internal_to_external (CONST Bufbyte *internal, Bytecount len, + unsigned char *external); +Bytecount copy_external_to_internal (CONST unsigned char *external, + int len, Bufbyte *internal); + #endif /* _XEMACS_MB_MULTIBYTE_H */