00001
00002
00003
00004
00005 # include "parm.h"
00006 # include "consnodes.h"
00007
00008
00009
00010
00011 # ifdef BAD
00012 extern boolean BADflag;
00013 # endif
00014
00015
00016 ConsNode * cn_cons(hd,tl)
00017 ANYTHING * hd;
00018 ConsNode * tl;
00019 { register ConsNode *p;
00020
00021 # ifdef BAD
00022 if (BADflag)
00023 flcheck (0,0);
00024
00025 else
00026 flcheck (0,1);
00027 # endif
00028
00029 p = (ConsNode *)malloc(sizeof (ConsNode) );
00030 cn_sethead( p, hd );
00031 cn_settail( p, tl );
00032 # ifdef BAD
00033 if (BADflag) {
00034 diagmsg("cn_cons: addr of new node=0%o, kind=ConsNode, retaddr=0%o\n",
00035 p, retaddr());
00036 }
00037 # endif
00038 return(p);
00039 }
00040
00041 ConsNode * cn_del_hd(l)
00042
00043
00044 ConsNode *l;
00045 { register ConsNode *p;
00046 # ifdef BAD
00047 if (BADflag) {
00048 diagmsg("cn_del_hd: addr of freed node=0%o, kind=ConsNode, retaddr=0%o\n",
00049 l, retaddr() );
00050 }
00051 # endif
00052
00053 # ifdef BAD
00054 if (BADflag)
00055 flcheck (0,0);
00056 else
00057 flcheck (0,1);
00058 # endif
00059
00060 p = cn_tail(l);
00061 free(l);
00062 return(p);
00063 }
00064
00065
00066