=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/sample2.c,v retrieving revision 1.3 retrieving revision 1.6 diff -u -p -r1.3 -r1.6 --- OpenXM/src/ox_toolkit/sample2.c 2000/10/10 05:23:21 1.3 +++ OpenXM/src/ox_toolkit/sample2.c 2003/03/23 20:17:35 1.6 @@ -1,5 +1,5 @@ /* -*- mode: C -*- */ -/* $OpenXM: OpenXM/src/ox_toolkit/sample2.c,v 1.2 2000/03/10 12:24:40 ohara Exp $ */ +/* $OpenXM: OpenXM/src/ox_toolkit/sample2.c,v 1.5 2003/02/04 20:43:55 ohara Exp $ */ /* This program explains how to get @@ -36,10 +36,12 @@ void explain_cmo_string(cmo_string *c) printf("%s", c->s); } +#if defined(WITH_GMP) void explain_cmo_zz(cmo_zz *c) { printf("%s", new_string_set_cmo((cmo *)c)); } +#endif /* WITH_GMP */ void explain_cmo(cmo *c) { @@ -53,9 +55,11 @@ void explain_cmo(cmo *c) case CMO_STRING: explain_cmo_string((cmo_string *)c); break; +#if defined(WITH_GMP) case CMO_ZZ: explain_cmo_zz((cmo_zz *)c); break; +#endif /* WITH_GMP */ default: printf("cmo"); } @@ -67,6 +71,7 @@ int main() cmo_list *c; cmo *d; + ox_stderr_init(stderr); /* starting an OpenXM server */ s = ox_start("localhost", "ox", "ox_sm1"); @@ -74,7 +79,9 @@ int main() c = list_appendl(new_cmo_list(), (cmo *)new_cmo_int32(10000), (cmo *)new_cmo_string("Hello"), +#if defined(WITH_GMP) (cmo *)new_cmo_zz_set_string("3141592653289793238462643383279"), +#endif /* WITH_GMP */ NULL); ox_push_cmo(s, (cmo *)c);