more xwt -> ibex cleanup
[nestedvm.git] / src / tests / EchoHelper.c
1 #include <stdio.h>
2 #include <string.h>
3
4 int main() {
5     char buf[1024];
6     char *p;
7     printf("Hello! Welcome to EchoHelper.c\n");
8     while(fgets(buf,sizeof(buf),stdin) != NULL) {
9         for(p=buf;*p && *p!='\n' && *p!='\r';p++);
10         *p = '\0';
11         fprintf(stdout,"You said: %s\n",buf);
12         fprintf(stderr,"They said: %s\n",buf);
13         if(strcmp(buf,"exit")==0) break;
14     }
15     return 0;
16 }