<commit_before>#define _POSIX_SOURCE
#define _POSIX_C_SOURCE 200112L
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>

#if !defined(LINE_MAX)
#if !defined(_POSIX_LINE_MAX)
#define LINE_MAX 4096
#else
#define LINE_MAX _POSIX_LINE_MAX
#endif
#endif

/* stderr is not constant so we can't use a static global here. */
#define lfile stderr

void prv(bool prtime, const char *fmt, va_list ap)
{
	if (prtime) {
		char str[LINE_MAX + 1];
		struct tm tm;
		time_t t = time(NULL);
		if (t == ((time_t) -1)) {
			perror("time");
			fprintf(stderr, "%s failed: time failed\n", __func__);
			abort();
		}
		if (!localtime_r(&t, &tm)) {
			fprintf(stderr, "%s failed: localtime failed\n", __func__);
			abort();
		}<commit_msg>No POSIX macros, please. Also, that is a very large array.<commit_after>#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>

enum { LINE_MAX = 256 };

/* stderr is not constant so we can't use a static global here. */
#define lfile stderr

void prv(bool prtime, const char *fmt, va_list ap)
{
	if (prtime) {
		char str[LINE_MAX + 1];
		struct tm tm;
		time_t t = time(NULL);
		if (t == ((time_t) -1)) {
			perror("time");
			fprintf(stderr, "%s failed: time failed\n", __func__);
			abort();
		}
		if (!localtime_r(&t, &tm)) {
			fprintf(stderr, "%s failed: localtime failed\n", __func__);
			abort();
		}
{'fraction_non_alphanumeric': 0.1612271540469974, 'fraction_numerical': 0.011096605744125326, 'mean_word_length': 4.196610169491525, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '3049394', 'n_tokens_mistral': 652, 'n_tokens_neox': 606, 'n_words': 175}