<commit_before>/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include "cr_spu.h"
#include "cr_url.h"
#include "cr_error.h"
#include "commspu.h"
#include <stdio.h>

extern SPUNamedFunctionTable comm_table[];

SPUFunctions comm_functions = {
	NULL, /* CHILD COPY */
	NULL, /* DATA */
	comm_table /* THE ACTUAL FUNCTIONS */
};

int commspuReceiveData( CRConnection *conn, void *buf, unsigned int len )
{
	(void) conn;
	(void) buf;
	(void) len;

	return 0; /* Just let the work pile up for later viewing */
}

void commspuConnectToPeer( void )
{
	char hostname[4096], protocol[4096];
	unsigned short port;

	crNetInit( commspuReceiveData, NULL );

	if (!crParseURL( comm_spu.peer_name, protocol, hostname, &port, COMM_SPU_PORT ) )
	{
		crError( "Malformed URL: \"%s\"", comm_spu.peer_name );
	}
	if (comm_spu.i_am_the_server)
	{
		comm_spu.peer_recv = crNetAcceptClient( protocol, port+1, comm_spu.mtu, 1 );
		comm_spu.peer_send = crNetConnectToServer( comm_spu.peer_name, port, comm_spu.mtu, 1 );
	}
	else
	{
		comm_spu.peer_send = crNetConnectToServer( comm_spu.peer_name, port+1, comm_spu.mtu, 1 );
		comm_spu.peer_recv = crNetAcceptClient( protocol, port, comm_spu.mtu, 1 );
	}
}
<commit_msg>more windows build lossage<commit_after>/* Copyright (c) 2001, Stanford University
 * All rights reserved
 *
 * See the file LICENSE.txt for information on redistributing this software.
 */

#include "cr_spu.h"
#include "cr_url.h"
#include "cr_error.h"
#include "commspu.h"
#include <stdio.h>

extern SPUNamedFunctionTable comm_table[];

SPUFunctions comm_functions = {
	NULL, /* CHILD COPY */
	NULL, /* DATA */
	comm_table /* THE ACTUAL FUNCTIONS */
};

int commspuReceiveData( CRConnection *conn, void *buf, unsigned int len )
{
	(void) conn;
	(void) buf;
	(void) len;

	return 0; /* Just let the work pile up for later viewing */
}

void commspuConnectToPeer( void )
{
	char hostname[4096], protocol[4096];
	unsigned short port;

	crNetInit( commspuReceiveData, NULL );

	if (!crParseURL( comm_spu.peer_name, protocol, hostname, &port, COMM_SPU_PORT ) )
	{
		crError( "Malformed URL: \"%s\"", comm_spu.peer_name );
	}
	if (comm_spu.i_am_the_server)
	{
		comm_spu.peer_recv = crNetAcceptClient( protocol, (short) (port+1), comm_spu.mtu, 1 );
		comm_spu.peer_send = crNetConnectToServer( comm_spu.peer_name, port, comm_spu.mtu, 1 );
	}
	else
	{
		comm_spu.peer_send = crNetConnectToServer( comm_spu.peer_name, (short) (port+1), comm_spu.mtu, 1 );
		comm_spu.peer_recv = crNetAcceptClient( protocol, port, comm_spu.mtu, 1 );
	}
}

{'fraction_non_alphanumeric': 0.12942519984773507, 'fraction_numerical': 0.01446516939474686, 'mean_word_length': 4.591489361702128, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4003150', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1004, 'n_words': 245}