<commit_before>#include "mupdf/fitz.h"

fz_document_writer *
fz_new_document_writer(fz_context *ctx, const char *path, const char *format, const char *options)
{
	if (!format)
	{
		format = strrchr(path, '.');
		if (!format)
			fz_throw(ctx, FZ_ERROR_GENERIC, "cannot detect document format");
		format += 1; /* skip the '.' */
	}

	if (!fz_strcasecmp(format, "cbz"))
		return fz_new_cbz_writer(ctx, path, options);

	fz_throw(ctx, FZ_ERROR_GENERIC, "unknown document format: %s", format);
}

void
fz_drop_document_writer(fz_context *ctx, fz_document_writer *wri)
{
	if (wri->drop_imp)
		wri->drop_imp(ctx, wri);
	fz_free(ctx, wri);
}

fz_device *
fz_begin_page(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox, fz_matrix *ctm)
{
	return wri->begin_page(ctx, wri, mediabox, ctm);
}

void
fz_end_page(fz_context *ctx, fz_document_writer *wri, fz_device *dev)
{
	return wri->end_page(ctx, wri, dev);
}
<commit_msg>Don't return a void function.<commit_after>#include "mupdf/fitz.h"

fz_document_writer *
fz_new_document_writer(fz_context *ctx, const char *path, const char *format, const char *options)
{
	if (!format)
	{
		format = strrchr(path, '.');
		if (!format)
			fz_throw(ctx, FZ_ERROR_GENERIC, "cannot detect document format");
		format += 1; /* skip the '.' */
	}

	if (!fz_strcasecmp(format, "cbz"))
		return fz_new_cbz_writer(ctx, path, options);

	fz_throw(ctx, FZ_ERROR_GENERIC, "unknown document format: %s", format);
}

void
fz_drop_document_writer(fz_context *ctx, fz_document_writer *wri)
{
	if (wri->drop_imp)
		wri->drop_imp(ctx, wri);
	fz_free(ctx, wri);
}

fz_device *
fz_begin_page(fz_context *ctx, fz_document_writer *wri, const fz_rect *mediabox, fz_matrix *ctm)
{
	return wri->begin_page(ctx, wri, mediabox, ctm);
}

void
fz_end_page(fz_context *ctx, fz_document_writer *wri, fz_device *dev)
{
	wri->end_page(ctx, wri, dev);
}

{'fraction_non_alphanumeric': 0.1435457953936797, 'fraction_numerical': 0.0010712372790573112, 'mean_word_length': 5.695340501792114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6571980', 'n_tokens_mistral': 822, 'n_tokens_neox': 800, 'n_words': 167}