Remove comments from OSUE-Team
This commit is contained in:
parent
998a3c8c31
commit
2e5a0d9f78
13
client.c
13
client.c
@ -6,7 +6,6 @@
|
|||||||
* @brief Client for OSUE exercise 1B `Battleship'.
|
* @brief Client for OSUE exercise 1B `Battleship'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// IO, C standard library, POSIX API, data types:
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -15,30 +14,24 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
// Assertions, errors, signals:
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
// Time:
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
// Sockets, TCP, ... :
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
// stuff shared by client and server:
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
// Static variables for things you might want to access from several functions:
|
static const char *port = DEFAULT_PORT;
|
||||||
static const char *port = DEFAULT_PORT; // the port to bind to
|
|
||||||
|
|
||||||
// Static variables for resources that should be freed before exiting:
|
static struct addrinfo *ai = NULL;
|
||||||
static struct addrinfo *ai = NULL; // addrinfo struct
|
|
||||||
static char *hostname = NULL;
|
static char *hostname = NULL;
|
||||||
static int sockfd = -1; // socket file descriptor
|
static int sockfd = -1;
|
||||||
static char* pname;
|
static char* pname;
|
||||||
|
|
||||||
static int field[MAP_SIZE][MAP_SIZE];
|
static int field[MAP_SIZE][MAP_SIZE];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user