<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>

#define _DTIFY(DT) [DT] #DT
const char const *types[] = {
	_DTIFY(DT_UNKNOWN),
	_DTIFY(DT_FIFO),
	_DTIFY(DT_CHR),
	_DTIFY(DT_DIR),
	_DTIFY(DT_BLK),
	_DTIFY(DT_REG),
	_DTIFY(DT_LNK),
	_DTIFY(DT_SOCK),
	_DTIFY(DT_WHT)
};

int main(int argc, char **argv)
{
	DIR *dirh;
	struct dirent *de;
	struct dirent64 *de64;
	const char const mydir[] = ".";

	if ((dirh = opendir(mydir)) == NULL) {
		perror("opendir");
		return 1;
	}

	printf("readdir() says:\n");
	while ((de = readdir(dirh)) != NULL)
		printf("\tdir entry %s: %s\n", types[de->d_type], de->d_name);

	rewinddir(dirh);

	printf("readdir64() says:\n");
	while ((de64 = readdir64(dirh)) != NULL)
		printf("\tdir entry %s: %s\n", types[de64->d_type], de64->d_name);

	closedir(dirh);


	return 0;
}<commit_msg>allow for runtime testing<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dirent.h>

#define _DTIFY(DT) [DT] #DT
const char const *types[] = {
	_DTIFY(DT_UNKNOWN),
	_DTIFY(DT_FIFO),
	_DTIFY(DT_CHR),
	_DTIFY(DT_DIR),
	_DTIFY(DT_BLK),
	_DTIFY(DT_REG),
	_DTIFY(DT_LNK),
	_DTIFY(DT_SOCK),
	_DTIFY(DT_WHT)
};

int main(int argc, char *argv[])
{
	DIR *dirh;
	struct dirent *de;
	struct dirent64 *de64;
	const char *mydir = (argc == 1 ? "/" : argv[1]);

	if ((dirh = opendir(mydir)) == NULL) {
		perror("opendir");
		return 1;
	}

	printf("readdir() says:\n");
	while ((de = readdir(dirh)) != NULL)
		printf("\tdir entry %s: %s\n", types[de->d_type], de->d_name);

	rewinddir(dirh);

	printf("readdir64() says:\n");
	while ((de64 = readdir64(dirh)) != NULL)
		printf("\tdir entry %s: %s\n", types[de64->d_type], de64->d_name);

	closedir(dirh);


	return 0;
}
{'fraction_non_alphanumeric': 0.20546448087431693, 'fraction_numerical': 0.018579234972677595, 'mean_word_length': 4.8126984126984125, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, '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': '1412992', 'n_tokens_mistral': 920, 'n_tokens_neox': 828, 'n_words': 167}