#include #include #include #include #include #include "gm.h" #include "rio.h" int rio_write( char *name, void *addr, unsigned bytes, unsigned offset ); int rio_read( char *name, void *addr, unsigned bytes, unsigned offset ); int rio_ping( char *name ); int rio_start(int port,FILE *log); void rio_stop(); void rio_gmserver(); extern int Rio_Loglevel; extern int Rio_Termn8server; __sighandler_t shutdown(int foo, __sighandler_t handler) { Rio_Termn8server= 1; /* rio_stop(); */ } /*---------------------------------------------------------------------------- * Test rio */ int main( int argc, char **argv ) { char name[256]; FILE *log=NULL; if ( argc != 2 ) { fprintf(stderr,"Usage: srioping server\n"); exit(1); } Rio_Loglevel= 1; strcpy(name,"//"); strcat(name,argv[1]); if ( !rio_ping(name) ) { fprintf(stderr,"Server %s does not reply\n"); return 0; } else { fprintf(stderr,"ok\n"); return 1; } }