<commit_before>#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>

#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unistd.h>
#endif

#include "tcp.h"

static int growl_tcp_parse_hostname(
    const char *const server,
    int default_port,
    struct sockaddr_in *const sockaddr);

void
growl_tcp_write_raw(
    int sock,
    const unsigned char * data,
    const int data_length) {

  send(sock, data, data_length, 0);
}

void
growl_tcp_write(int sock, const char *const format, ...) {
  int length;
  char *output;
  char *stop;

  va_list ap;

  va_start(ap, format);
  length = vsnprintf(NULL, 0, format, ap);
  va_end(ap);

  va_start(ap,format);
  output = (char*)malloc(length+1);
  if (!output) {
    va_end(ap);
    return;
  }<commit_msg>And this.<commit_after>#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>

#ifdef _WIN32
#include <winsock2.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <unistd.h>
#endif

#include "tcp.h"

static int growl_tcp_parse_hostname(
    const char *const server,
    int default_port,
    struct sockaddr_in *const sockaddr);

void
growl_tcp_write_raw(
    int sock,
    const unsigned char * data,
    const int data_length) {

  send(sock, (const char*) data, data_length, 0);
}

void
growl_tcp_write(int sock, const char *const format, ...) {
  int length;
  char *output;
  char *stop;

  va_list ap;

  va_start(ap, format);
  length = vsnprintf(NULL, 0, format, ap);
  va_end(ap);

  va_start(ap,format);
  output = (char*)malloc(length+1);
  if (!output) {
    va_end(ap);
    return;
  }
{'fraction_non_alphanumeric': 0.14253135689851767, 'fraction_numerical': 0.0068415051311288486, 'mean_word_length': 3.971671388101983, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '7162852', 'n_tokens_mistral': 706, 'n_tokens_neox': 686, 'n_words': 171}