WIP: Comply with GNU Coding Standards

This commit is contained in:
Thomas Wade 2018-10-31 22:23:57 +10:30
parent 59c594c5c3
commit 0e9076d239

View File

@ -1,8 +1,7 @@
/*
* ENGR2782 - CN Assignment
* Your challenge is to format the following code in a readable manner, anwsering the questions in the comments.
*
*/
// server1 - server program for demonstrating data transfer over TCP/IP
// This program complies with the GNU Coding Standards found here:
// https://www.gnu.org/prep/standards/html_node/index.html
#include <stdio.h>
#include <stdlib.h>
@ -16,11 +15,15 @@
#include <fcntl.h>
#include <unistd.h>
#include <strings.h>
#define BUFFERT 512
#define BACKLOG 1
int create_server_socket (int port);
struct sockaddr_in sock_serv,sock_clt;
int main(int argc, char** argv){
int main(int argc, char** argv)
{
int sfd, fd;
unsigned int length = sizeof(struct sockaddr_in);
long int n, m, count = 0;