comparison src/lisp.h @ 5093:33bc58a32dc2

merge
author Ben Wing <ben@xemacs.org>
date Wed, 03 Mar 2010 05:19:49 -0600
parents 0ca81354c4c7 3aa3888729c3
children cb4f2e1bacc4
comparison
equal deleted inserted replaced
5090:0ca81354c4c7 5093:33bc58a32dc2
3464 #define CONCHECK_NATNUM(x) do { \ 3464 #define CONCHECK_NATNUM(x) do { \
3465 if (!NATNUMP (x)) \ 3465 if (!NATNUMP (x)) \
3466 x = wrong_type_argument (Qnatnump, x); \ 3466 x = wrong_type_argument (Qnatnump, x); \
3467 } while (0) 3467 } while (0)
3468 3468
3469 END_C_DECLS
3470
3471 /* -------------- properties of internally-formatted text ------------- */
3472
3473 #include "text.h"
3474
3469 /*------------------------------- char ---------------------------------*/ 3475 /*------------------------------- char ---------------------------------*/
3476
3477 BEGIN_C_DECLS
3478
3479 #ifdef ERROR_CHECK_TYPES
3470 3480
3471 /* NOTE: There are basic functions for converting between a character and 3481 /* NOTE: There are basic functions for converting between a character and
3472 the string representation of a character in text.h, as well as lots of 3482 the string representation of a character in text.h, as well as lots of
3473 other character-related stuff. There are other functions/macros for 3483 other character-related stuff. There are other functions/macros for
3474 working with Ichars in charset.h, for retrieving the charset of an 3484 working with Ichars in charset.h, for retrieving the charset of an
3475 Ichar, the length of an Ichar when converted to text, etc. 3485 Ichar, the length of an Ichar when converted to text, etc.
3476 */ 3486 */
3477
3478 #ifdef MULE
3479
3480 MODULE_API int non_ascii_valid_ichar_p (Ichar ch);
3481
3482 /* Return whether the given Ichar is valid.
3483 */
3484
3485 DECLARE_INLINE_HEADER (
3486 int
3487 valid_ichar_p (Ichar ch)
3488 )
3489 {
3490 return (! (ch & ~0xFF)) || non_ascii_valid_ichar_p (ch);
3491 }
3492
3493 #else /* not MULE */
3494
3495 /* This works when CH is negative, and correctly returns non-zero only when CH
3496 is in the range [0, 255], inclusive. */
3497 #define valid_ichar_p(ch) (! (ch & ~0xFF))
3498
3499 #endif /* not MULE */
3500
3501 #ifdef ERROR_CHECK_TYPES
3502 3487
3503 DECLARE_INLINE_HEADER ( 3488 DECLARE_INLINE_HEADER (
3504 int 3489 int
3505 CHARP_1 (Lisp_Object obj, const Ascbyte *file, int line) 3490 CHARP_1 (Lisp_Object obj, const Ascbyte *file, int line)
3506 ) 3491 )
3843 /* The following two are only called by the garbage collector */ 3828 /* The following two are only called by the garbage collector */
3844 int finish_marking_weak_lists (void); 3829 int finish_marking_weak_lists (void);
3845 void prune_weak_lists (void); 3830 void prune_weak_lists (void);
3846 3831
3847 END_C_DECLS 3832 END_C_DECLS
3848
3849 /************************************************************************/
3850 /* Definitions related to the format of text and of characters */
3851 /************************************************************************/
3852
3853 /* Note:
3854
3855 "internally formatted text" and the term "internal format" in
3856 general are likely to refer to the format of text in buffers and
3857 strings; "externally formatted text" and the term "external format"
3858 refer to any text format used in the O.S. or elsewhere outside of
3859 XEmacs. The format of text and of a character are related and
3860 there must be a one-to-one relationship (hopefully through a
3861 relatively simple algorithmic means of conversion) between a string
3862 of text and an equivalent array of characters, but the conversion
3863 between the two is NOT necessarily trivial.
3864
3865 In a non-Mule XEmacs, allowed characters are numbered 0 through
3866 255, where no fixed meaning is assigned to them, but (when
3867 representing text, rather than bytes in a binary file) in practice
3868 the lower half represents ASCII and the upper half some other 8-bit
3869 character set (chosen by setting the font, case tables, syntax
3870 tables, etc. appropriately for the character set through ad-hoc
3871 means such as the `iso-8859-1' file and the
3872 `standard-display-european' function).
3873
3874 #### Finish this.
3875
3876 */
3877 #include "text.h"
3878
3879 3833
3880 /************************************************************************/ 3834 /************************************************************************/
3881 /* Definitions of primitive Lisp functions and variables */ 3835 /* Definitions of primitive Lisp functions and variables */
3882 /************************************************************************/ 3836 /************************************************************************/
3883 3837