mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-18 22:26:30 +01:00
finish rq to work with current format; add to makefile
This commit is contained in:
parent
4ad735124c
commit
2ec67c8ed1
2 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ xwrelay: $(OBJ)
|
||||||
rq: rq.c
|
rq: rq.c
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f xwrelay $(OBJ)
|
rm -f xwrelay $(OBJ) rq
|
||||||
|
|
||||||
tags:
|
tags:
|
||||||
etags *.cpp *.h
|
etags *.cpp *.h
|
||||||
|
|
|
@ -70,7 +70,7 @@ do_rooms( int sockfd, int lang, int nPlayers )
|
||||||
write( sockfd, &len, sizeof(len) );
|
write( sockfd, &len, sizeof(len) );
|
||||||
write( sockfd, msg, sizeof(msg) );
|
write( sockfd, msg, sizeof(msg) );
|
||||||
|
|
||||||
fprintf( stderr, "Waiting for response...." );
|
fprintf( stderr, "Waiting for response....\n" );
|
||||||
ssize_t nRead = recv( sockfd, &len,
|
ssize_t nRead = recv( sockfd, &len,
|
||||||
sizeof(len), MSG_WAITALL );
|
sizeof(len), MSG_WAITALL );
|
||||||
assert( nRead == sizeof(len) );
|
assert( nRead == sizeof(len) );
|
||||||
|
@ -89,7 +89,7 @@ do_rooms( int sockfd, int lang, int nPlayers )
|
||||||
char* saveptr;
|
char* saveptr;
|
||||||
for ( ii = 0; ii < nRooms; ++ii ) {
|
for ( ii = 0; ii < nRooms; ++ii ) {
|
||||||
char* str = strtok_r( ptr, "\n", &saveptr );
|
char* str = strtok_r( ptr, "\n", &saveptr );
|
||||||
fprintf( stdout, "%s", str );
|
fprintf( stdout, "%s\n", str );
|
||||||
ptr = NULL;
|
ptr = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue