[BACK]Return to list.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Kan

Diff for /OpenXM/src/kan96xx/Kan/list.c between version 1.5 and 1.6

version 1.5, 2004/09/11 01:00:42 version 1.6, 2005/06/16 05:07:23
Line 1 
Line 1 
 /* $OpenXM: OpenXM/src/kan96xx/Kan/list.c,v 1.4 2004/09/09 11:42:22 takayama Exp $ */  /* $OpenXM: OpenXM/src/kan96xx/Kan/list.c,v 1.5 2004/09/11 01:00:42 takayama Exp $ */
 /* list.c */  /* list.c */
 #include <stdio.h>  #include <stdio.h>
 #include "datatype.h"  #include "datatype.h"
Line 27  struct object *newList(objp)
Line 27  struct object *newList(objp)
   /* Warning!! Make a copy of the object. It is important. */    /* Warning!! Make a copy of the object. It is important. */
   *(op->lc.op) = *(objp);    *(op->lc.op) = *(objp);
   op->rc.op = (struct object *)NULL;    op->rc.op = (struct object *)NULL;
     op->attr = NULL;
   return(op);    return(op);
 }  }
   
Line 48  struct object listToArray(objp)
Line 49  struct object listToArray(objp)
      /* This function copies only the top level of the list */       /* This function copies only the top level of the list */
 {  {
   int n;    int n;
   struct object ans;    struct object ans = OINIT;
   int i;    int i;
   if (objp->tag != Slist) {    if (objp->tag != Slist) {
     warningList("use objectListToObjectArray() for object-list.");      warningList("use objectListToObjectArray() for object-list.");
Line 189  static warningList(str)
Line 190  static warningList(str)
 }  }
   
 struct object KvJoin(struct object listo1,struct object listo2) {  struct object KvJoin(struct object listo1,struct object listo2) {
   struct object rob;    struct object rob = OINIT;
   struct object *op1,*op2;    struct object *op1,*op2;
   if (listo1.tag == Snull) return listo2;    if (listo1.tag == Snull) return listo2;
   if (listo2.tag == Snull) return listo1;    if (listo2.tag == Snull) return listo1;
Line 214  struct object Kcar(struct object listo) {
Line 215  struct object Kcar(struct object listo) {
 }  }
 struct object Kcdr(struct object listo) {  struct object Kcdr(struct object listo) {
   struct object *op;    struct object *op;
   struct object rob;    struct object rob = OINIT;
   if (listo.tag == Snull) return listo;    if (listo.tag == Snull) return listo;
   if (listo.tag == Slist) {    if (listo.tag == Slist) {
     op = cdr(&listo);      op = cdr(&listo);

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>