<commit_before>#pragma once

#include <stdlib.h>
#include <stdio.h>
#include <error.h>
#include <errno.h>
#include <unistd.h>

// error exit
#define die(code, msg, ...) 	error(1, (code), "" msg, ##__VA_ARGS__)

// error checking
#define just(expr)	\
	_Generic((expr), 	\
			ssize_t:	_check_long_ret,	\
			int:		_check_int_ret,	\
			FILE*:		_check_ptr_ret,	\
			void*:		_check_ptr_ret,	\
			default: 	NULL	\
	)((expr), __FILE__, __LINE__)

// 'just' helpers
int _check_int_ret(const int ret, const char* const file, const int line);
long _check_long_ret(const ssize_t ret, const char* const file, const int line);
void* _check_ptr_ret(void* const ret, const char* const file, const int line);

// exit status check
void check_exit_status(int status);
<commit_msg>Removed unused default branch in just() macro.<commit_after>#pragma once

#include <stdlib.h>
#include <stdio.h>
#include <error.h>
#include <errno.h>
#include <unistd.h>

// error exit
#define die(code, msg, ...) 	error(1, (code), "" msg, ##__VA_ARGS__)

// error checking
#define just(expr)	\
	_Generic((expr), 	\
			ssize_t:	_check_long_ret,	\
			int:		_check_int_ret,	\
			FILE*:		_check_ptr_ret,	\
			void*:		_check_ptr_ret	\
	)((expr), __FILE__, __LINE__)

// 'just' helpers
int _check_int_ret(const int ret, const char* const file, const int line);
long _check_long_ret(const ssize_t ret, const char* const file, const int line);
void* _check_ptr_ret(void* const ret, const char* const file, const int line);

// exit status check
void check_exit_status(int status);

{'fraction_non_alphanumeric': 0.140625, 'fraction_numerical': 0.0013020833333333333, 'mean_word_length': 4.336805555555555, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '5846400', 'n_tokens_mistral': 609, 'n_tokens_neox': 586, 'n_words': 164}