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

Diff for /OpenXM/doc/oxlib/test.c between version 1.2 and 1.3

version 1.2, 2002/02/25 07:14:44 version 1.3, 2002/02/25 07:24:33
Line 1 
Line 1 
 /* $OpenXM: OpenXM/doc/oxlib/test.c,v 1.1 2002/02/25 07:09:01 noro Exp $ */  /* $OpenXM: OpenXM/doc/oxlib/test.c,v 1.2 2002/02/25 07:14:44 noro Exp $ */
 #include <asir/ox.h>  #include <asir/ox.h>
   
 main() {  main() {
Line 11  main() {
Line 11  main() {
         len0 = BUFSIZ;          len0 = BUFSIZ;
         obuf = (char *)malloc(len0);          obuf = (char *)malloc(len0);
         while ( 1 ) {          while ( 1 ) {
                   printf("Input> ");
                 fgets(ibuf,BUFSIZ,stdin);                  fgets(ibuf,BUFSIZ,stdin);
                 if ( !strncmp(ibuf,"bye",3) )                  if ( !strncmp(ibuf,"bye",3) )
                         exit(0);                          exit(0);
Line 21  main() {
Line 22  main() {
                         obuf = (char *)realloc(obuf,len0);                          obuf = (char *)realloc(obuf,len0);
                 }                  }
                 asir_ox_pop_string(obuf,len0);                  asir_ox_pop_string(obuf,len0);
                 printf("%s\n",obuf);                  printf("Output> %s\n",obuf);
         }          }
 }  }
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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