version 1.3, 2000/10/10 05:23:21 |
version 1.6, 2003/03/23 20:17:35 |
|
|
/* -*- mode: C -*- */ |
/* -*- mode: C -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/sample1.c,v 1.2 2000/03/10 12:24:39 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/sample1.c,v 1.5 2003/02/04 20:43:55 ohara Exp $ */ |
|
|
/* |
/* |
This sample program explains how to construct |
This sample program explains how to construct |
|
|
OXFILE *s; |
OXFILE *s; |
cmo_list *c; |
cmo_list *c; |
|
|
|
ox_stderr_init(stderr); |
/* starting an OpenXM server */ |
/* starting an OpenXM server */ |
s = ox_start("localhost", "ox", "ox_sm1"); |
s = ox_start("localhost", "ox", "ox_sm1"); |
|
|
|
|
the elements are a bignum. */ |
the elements are a bignum. */ |
c = new_cmo_list(); |
c = new_cmo_list(); |
|
|
|
#if defined(WITH_GMP) |
list_append(c, new_cmo_zz_set_si(10000)); |
list_append(c, new_cmo_zz_set_si(10000)); |
list_append(c, new_cmo_zz_set_si(-2342)); |
list_append(c, new_cmo_zz_set_si(-2342)); |
list_append(c, new_cmo_zz_set_string("3141592653289793238462643383279")); |
list_append(c, new_cmo_zz_set_string("3141592653289793238462643383279")); |
|
#endif /* WITH_GMP */ |
|
|
/* sending the list above. */ |
/* sending the list above. */ |
ox_push_cmo(s, (cmo *)c); |
ox_push_cmo(s, (cmo *)c); |