version 1.1, 2000/10/10 05:23:20 |
version 1.8, 2016/06/30 01:14:00 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/dump.c,v 1.7 2015/08/27 03:03:33 ohara Exp $ */ |
|
|
/* |
/* |
This module includes functions for sending/receiveng CMO's. |
This module includes functions for sending/receiveng CMO's. |
Some commnets is written in Japanese by the EUC-JP coded |
|
character set. |
|
*/ |
*/ |
|
|
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
#include <string.h> |
|
#if !defined(_MSC_VER) |
#include <sys/param.h> |
#include <sys/param.h> |
|
#else |
|
#include <winsock2.h> |
|
#endif |
#include "ox_toolkit.h" |
#include "ox_toolkit.h" |
|
|
static void dump_cmo_int32(cmo_int32* m); |
static void dump_cmo_int32(cmo_int32* m); |
Line 19 static void dump_cmo_null(cmo_null* m); |
|
Line 22 static void dump_cmo_null(cmo_null* m); |
|
static void dump_cmo_string(cmo_string* m); |
static void dump_cmo_string(cmo_string* m); |
static void dump_cmo_monomial32(cmo_monomial32* c); |
static void dump_cmo_monomial32(cmo_monomial32* c); |
static void dump_cmo_zz(cmo_zz* c); |
static void dump_cmo_zz(cmo_zz* c); |
|
static void dump_mpz(mpz_ptr mpz); |
static void dump_string(void *s, int len); |
static void dump_string(void *s, int len); |
static void dump_integer(int x); |
static void dump_integer(int x); |
static void dump_mpz(mpz_ptr mpz); |
|
|
|
/* functions encoding cmo to binary */ |
/* functions encoding cmo to binary */ |
|
|
Line 109 static void dump_cmo_zz(cmo_zz* c) |
|
Line 112 static void dump_cmo_zz(cmo_zz* c) |
|
static void dump_cmo_distributed_polynomial(cmo_distributed_polynomial* m) |
static void dump_cmo_distributed_polynomial(cmo_distributed_polynomial* m) |
{ |
{ |
cell* cp; |
cell* cp; |
dump_integer(list_length(m)); |
dump_integer(list_length((cmo_list *)m)); |
dump_cmo(m->ringdef); |
dump_cmo(m->ringdef); |
for(cp = list_first(m); !list_endof(m, cp); cp = list_next(cp)) { |
for(cp = list_first((cmo_list *)m); !list_endof((cmo_list *)m, cp); cp = list_next(cp)) { |
dump_cmo(cp->cmo); |
dump_cmo(cp->cmo); |
} |
} |
} |
} |
Line 151 void dump_cmo(cmo* m) |
|
Line 154 void dump_cmo(cmo* m) |
|
dump_cmo_distributed_polynomial((cmo_distributed_polynomial *)m); |
dump_cmo_distributed_polynomial((cmo_distributed_polynomial *)m); |
break; |
break; |
default: |
default: |
|
; |
} |
} |
} |
} |
|
|