<commit_before>#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <time.h>
#include "ini.h"
#include "net.h"
#include "xcalc.h"

#define _mkstr_(x) #x
#define _mkstr(x) _mkstr_(x)

#ifndef ARRAY_SIZE
# define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
#endif

#define pr_err(...) do { \
	if (opt.verbose >= 0) \
		fprintf(stderr, "ERROR:" __VA_ARGS__); \
	} while(0)

#define pr_info(...) do { \
	if (opt.verbose > 0) \
		fprintf(stderr, __VA_ARGS__); \
	} while(0)

#define pr_dbg(...) do { \
	if (opt.verbose > 1) \
		fprintf(stderr, "DEBUG:" __VA_ARGS__); \
	} while(0)

static struct {
	char host[64];
	int port;
	char nick[32];
	char realname[128];
	char autojoin[256];
	char quitmessage[256];
	char commandprefix[64];
	int verbose;
} opt;

static char inbuf[1024];
static size_t inbuf_ofs;
static size_t inbuf_max = sizeof(inbuf);
static sig_atomic_t keep_going;
static time_t start_time;

static int bot_option(const char *name, const char *value)
{
	const struct {
		char *name;
		char *type;
		void *ptr;
	} options[] = {
		{ "host", "%63s", &opt.host },
		{ "port", "%d", &opt.port },
		{ "realname", "%127s", &opt.realname },
		{ "nick", "%31s", &opt.nick },
		{ "autojoin", "%255s", &opt.autojoin },
		{ "quitmessage", "%255[^\n]", &opt.quitmessage },
		{ "commandprefix", "%63s", &opt.commandprefix },
		{ "verbose", "%d", &opt.verbose },
	};
	unsigned i;<commit_msg>fixed realname field<commit_after>#include <assert.h>
#include <stdlib.h>
#include <ctype.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <time.h>
#include "ini.h"
#include "net.h"
#include "xcalc.h"

#define _mkstr_(x) #x
#define _mkstr(x) _mkstr_(x)

#ifndef ARRAY_SIZE
# define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
#endif

#define pr_err(...) do { \
	if (opt.verbose >= 0) \
		fprintf(stderr, "ERROR:" __VA_ARGS__); \
	} while(0)

#define pr_info(...) do { \
	if (opt.verbose > 0) \
		fprintf(stderr, __VA_ARGS__); \
	} while(0)

#define pr_dbg(...) do { \
	if (opt.verbose > 1) \
		fprintf(stderr, "DEBUG:" __VA_ARGS__); \
	} while(0)

static struct {
	char host[64];
	int port;
	char nick[32];
	char realname[128];
	char autojoin[256];
	char quitmessage[256];
	char commandprefix[64];
	int verbose;
} opt;

static char inbuf[1024];
static size_t inbuf_ofs;
static size_t inbuf_max = sizeof(inbuf);
static sig_atomic_t keep_going;
static time_t start_time;

static int bot_option(const char *name, const char *value)
{
	const struct {
		char *name;
		char *type;
		void *ptr;
	} options[] = {
		{ "host", "%63s", &opt.host },
		{ "port", "%d", &opt.port },
		{ "realname", "%127[^\n]", &opt.realname },
		{ "nick", "%31s", &opt.nick },
		{ "autojoin", "%255s", &opt.autojoin },
		{ "quitmessage", "%255[^\n]", &opt.quitmessage },
		{ "commandprefix", "%63s", &opt.commandprefix },
		{ "verbose", "%d", &opt.verbose },
	};
	unsigned i;
{'fraction_non_alphanumeric': 0.20073357785928642, 'fraction_numerical': 0.026675558519506502, 'mean_word_length': 4.2264808362369335, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 27, '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': '4676250', 'n_tokens_mistral': 1300, 'n_tokens_neox': 1222, 'n_words': 289}