version 1.6, 2003/03/23 20:17:35 |
version 1.7, 2003/03/30 08:05:23 |
|
|
/* -*- mode: C -*- */ |
/* -*- mode: C -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/sample2.c,v 1.5 2003/02/04 20:43:55 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/sample2.c,v 1.6 2003/03/23 20:17:35 ohara Exp $ */ |
|
|
/* |
/* |
This program explains how to get |
This program explains how to get |
Line 36 void explain_cmo_string(cmo_string *c) |
|
Line 36 void explain_cmo_string(cmo_string *c) |
|
printf("%s", c->s); |
printf("%s", c->s); |
} |
} |
|
|
#if defined(WITH_GMP) |
|
void explain_cmo_zz(cmo_zz *c) |
void explain_cmo_zz(cmo_zz *c) |
{ |
{ |
printf("%s", new_string_set_cmo((cmo *)c)); |
printf("%s", new_string_set_cmo((cmo *)c)); |
} |
} |
#endif /* WITH_GMP */ |
|
|
|
void explain_cmo(cmo *c) |
void explain_cmo(cmo *c) |
{ |
{ |
Line 55 void explain_cmo(cmo *c) |
|
Line 53 void explain_cmo(cmo *c) |
|
case CMO_STRING: |
case CMO_STRING: |
explain_cmo_string((cmo_string *)c); |
explain_cmo_string((cmo_string *)c); |
break; |
break; |
#if defined(WITH_GMP) |
|
case CMO_ZZ: |
case CMO_ZZ: |
explain_cmo_zz((cmo_zz *)c); |
explain_cmo_zz((cmo_zz *)c); |
break; |
break; |
#endif /* WITH_GMP */ |
|
default: |
default: |
printf("cmo"); |
printf("cmo"); |
} |
} |
|
|
c = list_appendl(new_cmo_list(), |
c = list_appendl(new_cmo_list(), |
(cmo *)new_cmo_int32(10000), |
(cmo *)new_cmo_int32(10000), |
(cmo *)new_cmo_string("Hello"), |
(cmo *)new_cmo_string("Hello"), |
#if defined(WITH_GMP) |
|
(cmo *)new_cmo_zz_set_string("3141592653289793238462643383279"), |
(cmo *)new_cmo_zz_set_string("3141592653289793238462643383279"), |
#endif /* WITH_GMP */ |
|
NULL); |
NULL); |
|
|
ox_push_cmo(s, (cmo *)c); |
ox_push_cmo(s, (cmo *)c); |