version 1.2, 2002/02/25 07:14:44 |
version 1.5, 2018/03/28 05:09:38 |
|
|
/* $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.4 2003/03/08 07:49:59 takayama Exp $ */ |
#include <asir/ox.h> |
#include <stdio.h> |
|
#include "hhh.h" |
|
|
main() { |
main() { |
char ibuf[BUFSIZ]; |
char ibuf[BUFSIZ]; |
|
|
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); |
|
|
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); |
} |
} |
} |
} |
|
|