<commit_before>#!/bin/bash

#version of ENet to use
ENET_VERSION="1.3.7"

#default path to emscripten
EMSCRIPTEN_HOME=`./find-emcc.py`

# Retrieve EMSCRIPTEN path to use
EMSCRIPTEN=$1
if [ "${EMSCRIPTEN}" == "" ]
then
	EMSCRIPTEN=${EMSCRIPTEN_HOME}
fi

echo "Emscripten path: ${EMSCRIPTEN}"

if [ ! -e "${EMSCRIPTEN}/emcc" ]
then
  echo "Please specify a valid path to emscripten."
  exit 1
fi


# download and unzip ENet
if [ ! -e "enet-${ENET_VERSION}.tar.gz" ]
then
  curl -O "http://enet.bespin.org/download/enet-${ENET_VERSION}.tar.gz"
fi

#configure the library
if [ ! -e "enet-${ENET_VERSION}/config.status" ]
then
	tar xzf "enet-${ENET_VERSION}.tar.gz"
	pushd "enet-${ENET_VERSION}"
	BASEDIR=$(dirname $(pwd))
	${EMSCRIPTEN}/emconfigure ./configure --libdir=${BASEDIR}/libs --includedir=${BASEDIR}/include
	popd
fi

pushd "enet-${ENET_VERSION}"
#build/rebuild the library..
echo "***** Building library .......*"
make
make install
popd

#compile test app
echo "***** Building test code ......*"
pushd "test"
export EMCC="${EMSCRIPTEN}/emcc"
make -e
echo "type 'node test client server' to run a simple test"
popd<commit_msg>gethostbyaddr and gethostbyname not available<commit_after>#!/bin/bash

#version of ENet to use
ENET_VERSION="1.3.7"

#default path to emscripten
EMSCRIPTEN_HOME=`./find-emcc.py`

# Retrieve EMSCRIPTEN path to use
EMSCRIPTEN=$1
if [ "${EMSCRIPTEN}" == "" ]
then
	EMSCRIPTEN=${EMSCRIPTEN_HOME}
fi

echo "Emscripten path: ${EMSCRIPTEN}"

if [ ! -e "${EMSCRIPTEN}/emcc" ]
then
  echo "Please specify a valid path to emscripten."
  exit 1
fi


# download and unzip ENet
if [ ! -e "enet-${ENET_VERSION}.tar.gz" ]
then
  curl -O "http://enet.bespin.org/download/enet-${ENET_VERSION}.tar.gz"
fi

#configure the library
if [ ! -e "enet-${ENET_VERSION}/config.status" ]
then
	tar xzf "enet-${ENET_VERSION}.tar.gz"
	pushd "enet-${ENET_VERSION}"
	BASEDIR=$(dirname $(pwd))
	${EMSCRIPTEN}/emconfigure ./configure --libdir=${BASEDIR}/libs --includedir=${BASEDIR}/include \
        ac_cv_func_gethostbyaddr_r=no \
        ac_cv_func_gethostbyname_r=no
	popd
fi

pushd "enet-${ENET_VERSION}"
#build/rebuild the library..
echo "***** Building library .......*"
make
make install
popd

#compile test app
echo "***** Building test code ......*"
pushd "test"
export EMCC="${EMSCRIPTEN}/emcc"
make -e
echo "type 'node test client server' to run a simple test"
popd
{'fraction_non_alphanumeric': 0.16582491582491582, 'fraction_numerical': 0.004208754208754209, 'mean_word_length': 4.270509977827051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3641864', 'n_tokens_mistral': 951, 'n_tokens_neox': 920, 'n_words': 227}