comparison src/lisp.h @ 173:8eaf7971accc r20-3b13

Import from CVS: tag r20-3b13
author cvs
date Mon, 13 Aug 2007 09:49:09 +0200
parents 5a88923fcbfe
children 3d6bfa290dbd
comparison
equal deleted inserted replaced
172:a38aed19690b 173:8eaf7971accc
538 FORMAT_TERMINAL, 538 FORMAT_TERMINAL,
539 539
540 /* Format used for input from the terminal. This should be controlled 540 /* Format used for input from the terminal. This should be controlled
541 by the `keyboard-coding-system' variable. */ 541 by the `keyboard-coding-system' variable. */
542 FORMAT_KEYBOARD, 542 FORMAT_KEYBOARD,
543 543
544 /* Format used for the external Unix environment -- argv[], stuff 544 /* Format used for the external Unix environment -- argv[], stuff
545 from getenv(), stuff from the /etc/passwd file, etc. 545 from getenv(), stuff from the /etc/passwd file, etc.
546 546
547 Perhaps should be the same as FORMAT_FILENAME. */ 547 Perhaps should be the same as FORMAT_FILENAME. */
548 FORMAT_OS, 548 FORMAT_OS,
549 549
550 /* Compound-text format. This is the standard X format used for 550 /* Compound-text format. This is the standard X format used for
551 data stored in properties, selections, and the like. This is 551 data stored in properties, selections, and the like. This is
552 an 8-bit no-lock-shift ISO2022 coding system. */ 552 an 8-bit no-lock-shift ISO2022 coding system. */
553 FORMAT_CTEXT 553 FORMAT_CTEXT
554 }; 554 };
626 626
627 enum Lisp_Type 627 enum Lisp_Type
628 { 628 {
629 /* Integer. XINT(obj) is the integer value. */ 629 /* Integer. XINT(obj) is the integer value. */
630 Lisp_Int /* 0 DTP-FIXNUM */ 630 Lisp_Int /* 0 DTP-FIXNUM */
631 631
632 /* XRECORD_LHEADER (object) points to a struct lrecord_header 632 /* XRECORD_LHEADER (object) points to a struct lrecord_header
633 lheader->implementation determines the type (and GC behaviour) 633 lheader->implementation determines the type (and GC behaviour)
634 of the object. */ 634 of the object. */
635 ,Lisp_Record /* 1 DTP-OTHER-POINTER */ 635 ,Lisp_Record /* 1 DTP-OTHER-POINTER */
636 636
637 /* Cons. XCONS (object) points to a struct Lisp_Cons. */ 637 /* Cons. XCONS (object) points to a struct Lisp_Cons. */
638 ,Lisp_Cons /* 2 DTP-LIST */ 638 ,Lisp_Cons /* 2 DTP-LIST */
639 639
640 /* LRECORD_STRING is NYI */ 640 /* LRECORD_STRING is NYI */
641 /* String. XSTRING (object) points to a struct Lisp_String. 641 /* String. XSTRING (object) points to a struct Lisp_String.
642 The length of the string, and its contents, are stored therein. */ 642 The length of the string, and its contents, are stored therein. */
643 ,Lisp_String /* 3 DTP-STRING */ 643 ,Lisp_String /* 3 DTP-STRING */
644 644
645 #ifndef LRECORD_VECTOR 645 #ifndef LRECORD_VECTOR
646 /* Vector of Lisp objects. XVECTOR(object) points to a struct Lisp_Vector. 646 /* Vector of Lisp objects. XVECTOR(object) points to a struct Lisp_Vector.
647 The length of the vector, and its contents, are stored therein. */ 647 The length of the vector, and its contents, are stored therein. */
648 ,Lisp_Vector /* 4 DTP-SIMPLE-ARRAY */ 648 ,Lisp_Vector /* 4 DTP-SIMPLE-ARRAY */
649 #endif 649 #endif
650 650
651 #ifndef LRECORD_SYMBOL 651 #ifndef LRECORD_SYMBOL
652 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */ 652 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
653 ,Lisp_Symbol 653 ,Lisp_Symbol
654 #endif /* !LRECORD_SYMBOL */ 654 #endif /* !LRECORD_SYMBOL */
655 655
656 ,Lisp_Char /* 5 DTP-CHAR */ 656 ,Lisp_Char /* 5 DTP-CHAR */
657 }; 657 };
658 658
659 /* unsafe! */ 659 /* unsafe! */
660 #define POINTER_TYPE_P(type) ((type) != Lisp_Int && (type) != Lisp_Char) 660 #define POINTER_TYPE_P(type) ((type) != Lisp_Int && (type) != Lisp_Char)
733 the Lisp caller and thus can be used in the C code 733 the Lisp caller and thus can be used in the C code
734 to mean "no such value". */ 734 to mean "no such value". */
735 735
736 #define UNBOUNDP(val) EQ (val, Qunbound) 736 #define UNBOUNDP(val) EQ (val, Qunbound)
737 #define GC_UNBOUNDP(val) GC_EQ (val, Qunbound) 737 #define GC_UNBOUNDP(val) GC_EQ (val, Qunbound)
738 738
739 /*********** cons ***********/ 739 /*********** cons ***********/
740 740
741 /* In a cons, the markbit of the car is the gc mark bit */ 741 /* In a cons, the markbit of the car is the gc mark bit */
742 742
743 struct Lisp_Cons 743 struct Lisp_Cons
937 #define CONCHECK_VECTOR(x) CONCHECK_NONRECORD (x, Lisp_Vector, Qvectorp) 937 #define CONCHECK_VECTOR(x) CONCHECK_NONRECORD (x, Lisp_Vector, Qvectorp)
938 938
939 #endif 939 #endif
940 940
941 #define vector_length(v) ((v)->size) 941 #define vector_length(v) ((v)->size)
942 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s))
942 #define vector_data(v) ((v)->contents) 943 #define vector_data(v) ((v)->contents)
944 #define XVECTOR_DATA(s) vector_data (XVECTOR (s))
943 #define vector_next(v) ((v)->contents[(v)->size]) 945 #define vector_next(v) ((v)->contents[(v)->size])
946
944 947
945 /*********** bit vector ***********/ 948 /*********** bit vector ***********/
946 949
947 #if (LONGBITS < 16) 950 #if (LONGBITS < 16)
948 #error What the hell?! 951 #error What the hell?!
1567 variable whose value should be marked in garbage collection. 1570 variable whose value should be marked in garbage collection.
1568 Normally every link of the chain is an automatic variable of a function, 1571 Normally every link of the chain is an automatic variable of a function,
1569 and its `val' points to some argument or local variable of the function. 1572 and its `val' points to some argument or local variable of the function.
1570 On exit to the function, the chain is set back to the value it had on 1573 On exit to the function, the chain is set back to the value it had on
1571 entry. This way, no link remains in the chain when the stack frame 1574 entry. This way, no link remains in the chain when the stack frame
1572 containing the link disappears. 1575 containing the link disappears.
1573 1576
1574 Every function that can call Feval must protect in this fashion all 1577 Every function that can call Feval must protect in this fashion all
1575 Lisp_Object variables whose contents will be used again. */ 1578 Lisp_Object variables whose contents will be used again. */
1576 1579
1577 extern struct gcpro *gcprolist; 1580 extern struct gcpro *gcprolist;