[BACK]Return to cmo.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_toolkit

Diff for /OpenXM/src/ox_toolkit/cmo.c between version 1.11 and 1.12

version 1.11, 2003/06/02 10:25:56 version 1.12, 2003/06/03 16:06:48
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM: OpenXM/src/ox_toolkit/cmo.c,v 1.10 2003/03/30 08:05:22 ohara Exp $ */  /* $OpenXM: OpenXM/src/ox_toolkit/cmo.c,v 1.11 2003/06/02 10:25:56 ohara Exp $ */
   
 /*  /*
    This module includes functions for sending/receiveng CMO's.     This module includes functions for sending/receiveng CMO's.
Line 14 
Line 14 
 #include "ox_toolkit.h"  #include "ox_toolkit.h"
 #include "parse.h"  #include "parse.h"
   
 static cell*        new_cell();  static cell*        new_cell(cmo *ob, int e);
 static char*        new_string_set_cmo_null();  static char*        new_string_set_cmo_null();
 static char*        new_string_set_cmo_int32(int integer);  static char*        new_string_set_cmo_int32(int integer);
 static char*        new_string_set_cmo_list(cmo_list *c);  static char*        new_string_set_cmo_list(cmo_list *c);
Line 22  static char*        new_string_set_cmo_zz(cmo_zz *c);
Line 22  static char*        new_string_set_cmo_zz(cmo_zz *c);
 static char*        new_string_set_cmo_double(cmo_double *m);  static char*        new_string_set_cmo_double(cmo_double *m);
   
 /* functions for a cmo_list */  /* functions for a cmo_list */
 static cell* new_cell(cmo *ob)  static cell* new_cell(cmo *ob, int e)
 {  {
     cell* h = MALLOC(sizeof(cell));      cell* h = MALLOC(sizeof(cell));
     h->next = NULL;      h->next = NULL;
     h->prev = NULL;      h->prev = NULL;
     h->cmo  = ob;      h->cmo  = ob;
       h->exp  = e;
     return h;      return h;
 }  }
   
Line 63  static void list_cons(cell *head, cell *new)
Line 64  static void list_cons(cell *head, cell *new)
   
 cmo_list *list_append(cmo_list* this, cmo* ob)  cmo_list *list_append(cmo_list* this, cmo* ob)
 {  {
     list_cons(this->head, new_cell(ob));      list_cons(this->head, new_cell(ob, 0));
       this->length++;
       return this;
   }
   
   cmo_list *list_append_monomial(cmo_list* this, cmo* coef, int exp)
   {
       list_cons(this->head, new_cell(coef, exp));
     this->length++;      this->length++;
     return this;      return this;
 }  }

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

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