/[gcl]/gcl/h/object.h
ViewVC logotype

Diff of /gcl/h/object.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by camm, Tue Aug 6 15:03:45 2002 UTC revision 1.11 by camm, Tue Sep 24 19:01:45 2002 UTC
# Line 988  void raise_pending_signals(); Line 988  void raise_pending_signals();
988    
989  EXTER unsigned plong signals_allowed, signals_pending  ;  EXTER unsigned plong signals_allowed, signals_pending  ;
990    
991    EXTER struct cons my_dot,my_dot_pit;
992    
993    #define global_endp(x)  ({\
994        object _x=(x);\
995        bool _b=FALSE;\
996        \
997        if (type_of(_x)==t_cons) {\
998           if (type_of(_x->c.c_cdr)!=t_cons && _x->c.c_cdr!=Cnil)\
999              my_dot.c_car=_x->c.c_cdr;\
1000           else \
1001              my_dot.c_car=(object)&my_dot_pit;\
1002        } else {\
1003           if (_x==my_dot.c_car)\
1004              x=(object)&my_dot;\
1005           else {\
1006             my_dot.c_car=(object)&my_dot_pit;\
1007             if (_x==Cnil || _x==(object)&my_dot_pit)\
1008                 _b=TRUE;\
1009             else\
1010                 FEwrong_type_argument(sLlist, _x);\
1011           }\
1012        }\
1013        _b;\
1014        })
1015    
1016    #define endp(x) ({\
1017        static struct cons s_my_dot={t_cons,0,0,0,(object)&my_dot_pit,(object)&my_dot_pit};\
1018        object _x=(x);\
1019        bool _b=FALSE;\
1020        \
1021        if (type_of(_x)==t_cons) {\
1022           if (type_of(_x->c.c_cdr)!=t_cons && _x->c.c_cdr!=Cnil)\
1023              s_my_dot.c_car=_x->c.c_cdr;\
1024           else \
1025              s_my_dot.c_car=(object)&my_dot_pit;\
1026        } else {\
1027           if (_x==s_my_dot.c_car)\
1028              x=(object)&s_my_dot;\
1029           else {\
1030             s_my_dot.c_car=(object)&my_dot_pit;\
1031             if (_x==Cnil || _x==(object)&my_dot_pit)\
1032                 _b=TRUE;\
1033             else\
1034                 FEwrong_type_argument(sLlist, _x);\
1035           }\
1036        }\
1037        _b;\
1038        })
1039    
1040    #define endp_prop(a) (type_of(a)==t_cons ? FALSE : ((a)==Cnil ? TRUE : (FEwrong_type_argument(sLlist, (a)),FALSE)))
1041        
1042    #define dot_list_eq(a,b) ((a)==(b) || ((a)->c.c_cdr==(object)&my_dot_pit && (a)->c.c_car==(b)))
1043    #define proper_list(a) (type_of(a)==t_cons || (a)==Cnil)
1044    #define proper_cons(a) (type_of(a)==t_cons && (a)->c.c_cdr!=(object)&my_dot_pit)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26