00001
00002
00003
00004
00005
00006 # define ANYTHING char
00007 # define NIL 0
00008
00009
00010
00011
00012 typedef struct cn {
00013 struct cn * cn_tl_field;
00014 ANYTHING * cn_hd_field; } ConsNode;
00015
00016 # define cn_tail(l) ( (struct cn *) ((l) -> cn_tl_field) )
00017
00018 # define cn_head(l) ( (l) -> cn_hd_field )
00019
00020 # define is_null_cn(l) ( (l) == NIL )
00021
00022
00023
00024
00025
00026 # define cn_sethead(nodeptr,fvalue) \
00027 ( (nodeptr) -> cn_hd_field = (ANYTHING *)(fvalue) )
00028
00029 # define cn_settail(nodeptr,list) \
00030 ( (nodeptr) -> cn_tl_field = (list) )
00031
00032 ConsNode * cn_cons();
00033
00034 ConsNode * cn_del_hd();