[BACK]Return to test1.c CVS log [TXT][DIR] Up to [local] / OpenXM / doc / oxlib

Diff for /OpenXM/doc/oxlib/test1.c between version 1.1 and 1.5

version 1.1, 2000/02/08 13:25:41 version 1.5, 2003/03/08 10:25:48
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/doc/oxlib/test1.c,v 1.4 2003/03/08 07:49:59 takayama Exp $ */
 #include <stdio.h>  #include <stdio.h>
 #include "oxasir.h"  #include <ox/cmotag.h>
   #include <ox/smCommand.h>
   
   
 main() {  main() {
   hoge();    hoge();
 }  }
Line 26  hoge() {
Line 28  hoge() {
   {00, 00, 00, 04, 00, 00, 00, 04,    {00, 00, 00, 04, 00, 00, 00, 04,
    0x69,0x67,0x63,0x64 };     0x69,0x67,0x63,0x64 };
   unsigned char cmo[1024];    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(cmo0);
   asir_ox_push_cmo(cmo1);    asir_ox_push_cmo(cmo1);
   asir_ox_push_cmo(cmo2);    asir_ox_push_cmo(cmo2);
Line 36  hoge() {
Line 38  hoge() {
   
   asir_ox_push_cmd(SM_executeFunction);  /* execute function */    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<size; i++) {
         printf(" %2x ",cmo[i]);          printf(" %2x ",cmo[i]);
   }    }
   printf("\n");    printf("\n");

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>