comparison src/mule-charset.c @ 5581:56144c8593a8

Mechanically change INT to FIXNUM in our sources. src/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> [...] Mechanically change INT (where it refers to non-bignum Lisp integers) to FIXNUM in our sources. Done for the following functions, enums, and macros: Lisp_Type_Int_Even, Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(), XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(), EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT. The EMACS_INT typedef was not changed, it does not describe non-bignum Lisp integers. Script that did the change available in http://mid.gmane.org/20067.17650.181273.12014@parhasard.net . modules/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> [...] Mechanically change INT to FIXNUM, where the usage describes non-bignum Lisp integers. See the src/ChangeLog entry for more details. man/ChangeLog addition: 2011-10-09 Aidan Kehoe <kehoea@parhasard.net> * internals/internals.texi (How Lisp Objects Are Represented in C): * internals/internals.texi (Integers and Characters): Mechanically change INT to FIXNUM, where the usage describes non-bignum Lisp integers.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 09 Oct 2011 09:51:57 +0100
parents 308d34e9f07d
children
comparison
equal deleted inserted replaced
5580:a0e81357194e 5581:56144c8593a8
300 lb = chlook->next_allocated_2_byte_leading_byte++; 300 lb = chlook->next_allocated_2_byte_leading_byte++;
301 } 301 }
302 302
303 if (!lb) 303 if (!lb)
304 invalid_operation 304 invalid_operation
305 ("No more character sets free for this dimension", make_int (dimension)); 305 ("No more character sets free for this dimension", make_fixnum (dimension));
306 306
307 return lb; 307 return lb;
308 } 308 }
309 309
310 310
505 long_name = value; 505 long_name = value;
506 } 506 }
507 507
508 else if (EQ (keyword, Qdimension)) 508 else if (EQ (keyword, Qdimension))
509 { 509 {
510 CHECK_INT (value); 510 CHECK_FIXNUM (value);
511 dimension = XINT (value); 511 dimension = XFIXNUM (value);
512 if (dimension < 1 || dimension > 2) 512 if (dimension < 1 || dimension > 2)
513 invalid_constant ("Invalid value for `dimension'", value); 513 invalid_constant ("Invalid value for `dimension'", value);
514 } 514 }
515 515
516 else if (EQ (keyword, Qchars)) 516 else if (EQ (keyword, Qchars))
517 { 517 {
518 CHECK_INT (value); 518 CHECK_FIXNUM (value);
519 chars = XINT (value); 519 chars = XFIXNUM (value);
520 if (chars != 94 && chars != 96) 520 if (chars != 94 && chars != 96)
521 invalid_constant ("Invalid value for `chars'", value); 521 invalid_constant ("Invalid value for `chars'", value);
522 } 522 }
523 523
524 else if (EQ (keyword, Qcolumns)) 524 else if (EQ (keyword, Qcolumns))
525 { 525 {
526 CHECK_INT (value); 526 CHECK_FIXNUM (value);
527 columns = XINT (value); 527 columns = XFIXNUM (value);
528 if (columns != 1 && columns != 2) 528 if (columns != 1 && columns != 2)
529 invalid_constant ("Invalid value for `columns'", value); 529 invalid_constant ("Invalid value for `columns'", value);
530 } 530 }
531 531
532 else if (EQ (keyword, Qgraphic)) 532 else if (EQ (keyword, Qgraphic))
533 { 533 {
534 CHECK_INT (value); 534 CHECK_FIXNUM (value);
535 graphic = XINT (value); 535 graphic = XFIXNUM (value);
536 if (graphic < 0 || graphic > 1) 536 if (graphic < 0 || graphic > 1)
537 invalid_constant ("Invalid value for `graphic'", value); 537 invalid_constant ("Invalid value for `graphic'", value);
538 } 538 }
539 539
540 else if (EQ (keyword, Qregistries)) 540 else if (EQ (keyword, Qregistries))
732 { 732 {
733 int dm, ch, fi, di = -1; 733 int dm, ch, fi, di = -1;
734 int type; 734 int type;
735 Lisp_Object obj = Qnil; 735 Lisp_Object obj = Qnil;
736 736
737 CHECK_INT (dimension); 737 CHECK_FIXNUM (dimension);
738 dm = XINT (dimension); 738 dm = XFIXNUM (dimension);
739 if (dm < 1 || dm > 2) 739 if (dm < 1 || dm > 2)
740 invalid_constant ("Invalid value for DIMENSION", dimension); 740 invalid_constant ("Invalid value for DIMENSION", dimension);
741 741
742 CHECK_INT (chars); 742 CHECK_FIXNUM (chars);
743 ch = XINT (chars); 743 ch = XFIXNUM (chars);
744 if (ch != 94 && ch != 96) 744 if (ch != 94 && ch != 96)
745 invalid_constant ("Invalid value for CHARS", chars); 745 invalid_constant ("Invalid value for CHARS", chars);
746 746
747 CHECK_CHAR_COERCE_INT (final); 747 CHECK_CHAR_COERCE_INT (final);
748 fi = XCHAR (final); 748 fi = XCHAR (final);
806 DEFUN ("charset-dimension", Fcharset_dimension, 1, 1, 0, /* 806 DEFUN ("charset-dimension", Fcharset_dimension, 1, 1, 0, /*
807 Return dimension of CHARSET. 807 Return dimension of CHARSET.
808 */ 808 */
809 (charset)) 809 (charset))
810 { 810 {
811 return make_int (XCHARSET_DIMENSION (Fget_charset (charset))); 811 return make_fixnum (XCHARSET_DIMENSION (Fget_charset (charset)));
812 } 812 }
813 813
814 DEFUN ("charset-property", Fcharset_property, 2, 2, 0, /* 814 DEFUN ("charset-property", Fcharset_property, 2, 2, 0, /*
815 Return property PROP of CHARSET, a charset object or symbol naming a charset. 815 Return property PROP of CHARSET, a charset object or symbol naming a charset.
816 Recognized properties are those listed in `make-charset', as well as 816 Recognized properties are those listed in `make-charset', as well as
826 CHECK_SYMBOL (prop); 826 CHECK_SYMBOL (prop);
827 if (EQ (prop, Qname)) return CHARSET_NAME (cs); 827 if (EQ (prop, Qname)) return CHARSET_NAME (cs);
828 if (EQ (prop, Qshort_name)) return CHARSET_SHORT_NAME (cs); 828 if (EQ (prop, Qshort_name)) return CHARSET_SHORT_NAME (cs);
829 if (EQ (prop, Qlong_name)) return CHARSET_LONG_NAME (cs); 829 if (EQ (prop, Qlong_name)) return CHARSET_LONG_NAME (cs);
830 if (EQ (prop, Qdoc_string)) return CHARSET_DOC_STRING (cs); 830 if (EQ (prop, Qdoc_string)) return CHARSET_DOC_STRING (cs);
831 if (EQ (prop, Qdimension)) return make_int (CHARSET_DIMENSION (cs)); 831 if (EQ (prop, Qdimension)) return make_fixnum (CHARSET_DIMENSION (cs));
832 if (EQ (prop, Qcolumns)) return make_int (CHARSET_COLUMNS (cs)); 832 if (EQ (prop, Qcolumns)) return make_fixnum (CHARSET_COLUMNS (cs));
833 if (EQ (prop, Qgraphic)) return make_int (CHARSET_GRAPHIC (cs)); 833 if (EQ (prop, Qgraphic)) return make_fixnum (CHARSET_GRAPHIC (cs));
834 if (EQ (prop, Qfinal)) return make_char (CHARSET_FINAL (cs)); 834 if (EQ (prop, Qfinal)) return make_char (CHARSET_FINAL (cs));
835 if (EQ (prop, Qchars)) return make_int (CHARSET_CHARS (cs)); 835 if (EQ (prop, Qchars)) return make_fixnum (CHARSET_CHARS (cs));
836 if (EQ (prop, Qregistries)) return CHARSET_REGISTRIES (cs); 836 if (EQ (prop, Qregistries)) return CHARSET_REGISTRIES (cs);
837 if (EQ (prop, Qencode_as_utf_8)) 837 if (EQ (prop, Qencode_as_utf_8))
838 return CHARSET_ENCODE_AS_UTF_8 (cs) ? Qt : Qnil; 838 return CHARSET_ENCODE_AS_UTF_8 (cs) ? Qt : Qnil;
839 if (EQ (prop, Qccl_program)) return CHARSET_CCL_PROGRAM (cs); 839 if (EQ (prop, Qccl_program)) return CHARSET_CCL_PROGRAM (cs);
840 if (EQ (prop, Qdirection)) 840 if (EQ (prop, Qdirection))
852 DEFUN ("charset-id", Fcharset_id, 1, 1, 0, /* 852 DEFUN ("charset-id", Fcharset_id, 1, 1, 0, /*
853 Return charset identification number of CHARSET. 853 Return charset identification number of CHARSET.
854 */ 854 */
855 (charset)) 855 (charset))
856 { 856 {
857 return make_int (XCHARSET_LEADING_BYTE (Fget_charset (charset))); 857 return make_fixnum (XCHARSET_LEADING_BYTE (Fget_charset (charset)));
858 } 858 }
859 859
860 /* #### We need to figure out which properties we really want to 860 /* #### We need to figure out which properties we really want to
861 allow to be set. */ 861 allow to be set. */
862 862