=================================================================== RCS file: /home/cvs/OpenXM/doc/oxlib/test1.c,v retrieving revision 1.1 retrieving revision 1.6 diff -u -p -r1.1 -r1.6 --- OpenXM/doc/oxlib/test1.c 2000/02/08 13:25:41 1.1 +++ OpenXM/doc/oxlib/test1.c 2018/03/28 05:09:38 1.6 @@ -1,7 +1,10 @@ -/* $OpenXM$ */ +/* $OpenXM: OpenXM/doc/oxlib/test1.c,v 1.5 2003/03/08 10:25:48 ohara Exp $ */ #include -#include "oxasir.h" +#include "hhh.h" +#include +#include + main() { hoge(); } @@ -26,9 +29,9 @@ hoge() { {00, 00, 00, 04, 00, 00, 00, 04, 0x69,0x67,0x63,0x64 }; unsigned char cmo[1024]; - int i; + int i,size; - asir_ox_init(0); + asir_ox_init(1); asir_ox_push_cmo(cmo0); asir_ox_push_cmo(cmo1); asir_ox_push_cmo(cmo2); @@ -36,9 +39,15 @@ hoge() { asir_ox_push_cmd(SM_executeFunction); /* execute function */ - asir_ox_pop_cmo(cmo, 20); + size = asir_ox_peek_cmo_size(); + if (size < 1024) { + asir_ox_pop_cmo(cmo, size); + }else{ + fprintf(stderr,"Too big cmo size.\n"); exit(1); + } - for (i=0; i<20; i++) { + printf("gcd of 12 and 8, in the cmo format, is \n"); + for (i=0; i