[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.1 and 1.4

version 1.1, 2000/10/10 05:23:20 version 1.4, 2003/01/11 11:42:31
Line 1 
Line 1 
 /* -*- mode: C; coding: euc-japan -*- */  /* -*- mode: C; coding: euc-japan -*- */
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/ox_toolkit/cmo.c,v 1.3 2000/12/14 01:39:31 ohara Exp $ */
   
 /*  /*
    This module includes functions for sending/receiveng CMO's.     This module includes functions for sending/receiveng CMO's.
Line 11 
Line 11 
 #include <stdlib.h>  #include <stdlib.h>
 #include <stdarg.h>  #include <stdarg.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  
 #include <errno.h>  
 #include <fcntl.h>  
 #include <sys/file.h>  
   
 #include "mysocket.h"  
 #include "ox_toolkit.h"  #include "ox_toolkit.h"
 #include "parse.h"  #include "parse.h"
   
 static cell*        new_cell();  static cell*        new_cell();
   
 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 80  cmo_list *list_appendl(cmo_list* this, ...)
Line 73  cmo_list *list_appendl(cmo_list* this, ...)
     cmo *ob;      cmo *ob;
     va_list ap;      va_list ap;
     va_start(ap, this);      va_start(ap, this);
           if (this == NULL) {
                   this = new_cmo_list();
           }
     while((ob = va_arg(ap, cmo *)) != NULL) {      while((ob = va_arg(ap, cmo *)) != NULL) {
         list_append(this, ob);          list_append(this, ob);
     }      }
Line 269  cmo_error2* new_cmo_error2(cmo* ob)
Line 265  cmo_error2* new_cmo_error2(cmo* ob)
     return c;      return c;
 }  }
   
 /* cmo と string (ここではC言語のstring) の変換関数群 */  
   /* Following functions translate cmo's to (asciiz) strings. */
 static char *new_string_set_cmo_zz(cmo_zz *c)  static char *new_string_set_cmo_zz(cmo_zz *c)
 {  {
     return mpz_get_str(NULL, 10, c->mpz);      return mpz_get_str(NULL, 10, c->mpz);
Line 336  char *new_string_set_cmo(cmo *m)
Line 333  char *new_string_set_cmo(cmo *m)
     default:      default:
 #ifdef DEBUG  #ifdef DEBUG
         symp = lookup_by_tag(m->tag);          symp = lookup_by_tag(m->tag);
         fprintf(stderr, "I do not know how to convert %s to a string.\n", symp->key);          fprintf(ox_stderr, "I do not know how to convert %s to a string.\n", symp->key);
 #endif  #endif
         /* yet not implemented. */          /* yet not implemented. */
         return NULL;          return NULL;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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