<commit_before>#include "grocery.h"

void print_help() {
	printf("This is a simple help string");
}

void preliminary_checks(int argc, char **argv) {
	if (argc != 2 || !strcmp(argv[1], "-h")) {
		print_help();
		exit(0);
	}
	if (atoi(argv[1]) < 0 || atoi(argv[1]) > 60000) {
		logger(ERROR, "Invalid port number", argv[1]);
		exit(0);
	}
	if (access("./www", F_OK | R_OK) != 0) {
		logger(ERROR, "Subdirectory 'www' does not exist", "check that");
		exit(0);
	}
	if(access('./cache', F_OK | R_OK) != 0) {
		logger(LOG, "Subdirectory 'cache' does not exist", "creating");
		mkdir("./cache", 0700);
	}<commit_msg>enforcing preliminary checks with cache prototyping<commit_after>#include "grocery.h"

void print_help() {
	printf("This is a simple help string");
}

void preliminary_checks(int argc, char **argv) {
	if (argc != 2 || !strcmp(argv[1], "-h")) {
		print_help();
		exit(0);
	}
	if (atoi(argv[1]) < 0 || atoi(argv[1]) > 60000) {
		logger(ERROR, "Invalid port number", argv[1]);
		exit(0);
	}
	if (access("./www", F_OK | R_OK) != 0) {
		logger(ERROR, "Subdirectory 'www' does not exist", "check that");
		exit(0);
	}
	if(access("./cache", F_OK | R_OK) != 0) {
		logger(LOG, "Subdirectory 'cache' does not exist", "creating");
		mkdir("./cache", 0700);
	}
{'fraction_non_alphanumeric': 0.2126984126984127, 'fraction_numerical': 0.031746031746031744, 'mean_word_length': 4.388888888888889, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '438396', 'n_tokens_mistral': 537, 'n_tokens_neox': 489, 'n_words': 125}