<commit_before>/* cmapdump.c -- parse a CMap file and dump it as a c-struct */

/* We never want to build memento versions of the cmapdump util */
#undef MEMENTO

/* We never want large file access here */
#undef FZ_LARGEFILE

#include <stdio.h>
#include <string.h>

#include "mupdf/pdf.h"

#include "../source/fitz/context.c"
#include "../source/fitz/error.c"
#include "../source/fitz/memory.c"
#include "../source/fitz/string.c"
#include "../source/fitz/buffer.c"
#include "../source/fitz/stream-open.c"
#include "../source/fitz/stream-read.c"
#include "../source/fitz/strtod.c"
#include "../source/fitz/ftoa.c"
#include "../source/fitz/printf.c"

#include "../source/pdf/pdf-lex.c"
#include "../source/pdf/pdf-cmap.c"
#include "../source/pdf/pdf-cmap-parse.c"

static void
clean(char *p)
{
	while (*p)
	{
		if ((*p == '/') || (*p == '.') || (*p == '\\') || (*p == '-'))
			*p = '_';
		p ++;<commit_msg>Fix Windows build; cmapdump.c requires fz_fopen_utf8<commit_after>/* cmapdump.c -- parse a CMap file and dump it as a c-struct */

/* We never want to build memento versions of the cmapdump util */
#undef MEMENTO

/* We never want large file access here */
#undef FZ_LARGEFILE

#include <stdio.h>
#include <string.h>

#include "mupdf/pdf.h"

#include "../source/fitz/context.c"
#include "../source/fitz/error.c"
#include "../source/fitz/memory.c"
#include "../source/fitz/string.c"
#include "../source/fitz/buffer.c"
#include "../source/fitz/stream-open.c"
#include "../source/fitz/stream-read.c"
#include "../source/fitz/strtod.c"
#include "../source/fitz/ftoa.c"
#include "../source/fitz/printf.c"
#ifdef _WIN32
#include "../source/fitz/time.c"
#endif

#include "../source/pdf/pdf-lex.c"
#include "../source/pdf/pdf-cmap.c"
#include "../source/pdf/pdf-cmap-parse.c"

static void
clean(char *p)
{
	while (*p)
	{
		if ((*p == '/') || (*p == '.') || (*p == '\\') || (*p == '-'))
			*p = '_';
		p ++;
{'fraction_non_alphanumeric': 0.23173935890698896, 'fraction_numerical': 0.0015764582238570678, 'mean_word_length': 3.175438596491228, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3348777', 'n_tokens_mistral': 757, 'n_tokens_neox': 744, 'n_words': 168}