<commit_before>typedef int message_value_type;
#define message_size        10  // For simplicity, a message is an array of 10 integers.
#define PORT_DEPTH          10  // make N=10 (num  msgs in buffer)
// Declare a set (array of ports). The ports are numbered 0 to 99.
#define NUM_PORTS           100 //Final requirement is 100
#define NUM_SERVERS 10
#define NUM_CLIENTS 50  // should not exceed NUM_PORTS - NUM_SERVERS
#include "msgs.h"
#include <assert.h>
#include <unistd.h>
#include <stdlib.h> // rand(), srand()
#include <time.h> // time()nistd.h>

Port_t ports[NUM_PORTS];
typedef unsigned int port_id_t;
port_id_t g_next_server = 0;
port_id_t g_next_client = NUM_SERVERS;

int randint(int max) {
    int randomNumber = (int)rand();
    int retVal = randomNumber % max;
//    printf("randomNumber = %d, retVal = %d\n", randomNumber, retVal);
    return retVal;
} 

void initrand() { srand((unsigned)(time(0))); }

int getNextServerPort(){
    port_id_t myPort = g_next_server;
    g_next_server++;
    return (myPort);
}

int getNextClientPort(){
    port_id_t myPort = g_next_client;
    g_next_client++;
    return (myPort);
}

port_id_t chooseServer(){
    port_id_t server_port = randint(NUM_SERVERS); 
    return (server_port);
}

void server(void)
{// server should listen on his own port only
    int j = 0;<commit_msg>fixed unused variable in port5.test.c so cmake will build<commit_after>typedef int message_value_type;
#define message_size        10  // For simplicity, a message is an array of 10 integers.
#define PORT_DEPTH          10  // make N=10 (num  msgs in buffer)
// Declare a set (array of ports). The ports are numbered 0 to 99.
#define NUM_PORTS           100 //Final requirement is 100
#define NUM_SERVERS 10
#define NUM_CLIENTS 50  // should not exceed NUM_PORTS - NUM_SERVERS
#include "msgs.h"
#include <assert.h>
#include <unistd.h>
#include <stdlib.h> // rand(), srand()
#include <time.h> // time()nistd.h>

Port_t ports[NUM_PORTS];
typedef unsigned int port_id_t;
port_id_t g_next_server = 0;
port_id_t g_next_client = NUM_SERVERS;

int randint(int max) {
    int randomNumber = (int)rand();
    int retVal = randomNumber % max;
//    printf("randomNumber = %d, retVal = %d\n", randomNumber, retVal);
    return retVal;
} 

void initrand() { srand((unsigned)(time(0))); }

int getNextServerPort(){
    port_id_t myPort = g_next_server;
    g_next_server++;
    return (myPort);
}

int getNextClientPort(){
    port_id_t myPort = g_next_client;
    g_next_client++;
    return (myPort);
}

port_id_t chooseServer(){
    port_id_t server_port = randint(NUM_SERVERS); 
    return (server_port);
}

void server(void)
{// server should listen on his own port only
{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.017810760667903526, 'mean_word_length': 3.7381370826010545, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3665590', 'n_tokens_mistral': 1003, 'n_tokens_neox': 934, 'n_words': 280}