<commit_before>/* att_getopt.cpp: a public domain implementation of getopt()
 *
 * The following source code is an adaptation of the public domain
 * getopt() implementation presented at the 1985 UNIFORUM conference
 * in Dallas, Texas.  Slight changes have been made to improve style
 * and readability.  The result is released into the public domain
 * like that from which it was derived.
 */

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

int ag_optind = 1;
int ag_optopt;
char* ag_optarg;

int
att_getopt(int argc, char* const argv[], const char* ag_opts)
{
	static int sp = 1;
	register int c;
	register char *cp;

	if (sp == 1) {
		/* If all args are processed, finish */
		if (ag_optind >= argc) {
			return EOF;
		}
		if (argv[ag_optind][0] != '-' || argv[ag_optind][1] == '\0') {
			return EOF;
		}
	}
	else if (!strcmp(argv[ag_optind], "--")) {
		/* No more ag_options to be processed after this one */
		ag_optind++;
		return EOF;
	}<commit_msg>Fixed a constness portability issue on Windows<commit_after>/* att_getopt.cpp: a public domain implementation of getopt()
 *
 * The following source code is an adaptation of the public domain
 * getopt() implementation presented at the 1985 UNIFORUM conference
 * in Dallas, Texas.  Slight changes have been made to improve style
 * and readability.  The result is released into the public domain
 * like that from which it was derived.
 */

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

int ag_optind = 1;
int ag_optopt;
char* ag_optarg;

int
att_getopt(int argc, char* const argv[], const char* ag_opts)
{
	static int sp = 1;
	register int c;
	register const char *cp;

	if (sp == 1) {
		/* If all args are processed, finish */
		if (ag_optind >= argc) {
			return EOF;
		}
		if (argv[ag_optind][0] != '-' || argv[ag_optind][1] == '\0') {
			return EOF;
		}
	}
	else if (!strcmp(argv[ag_optind], "--")) {
		/* No more ag_options to be processed after this one */
		ag_optind++;
		return EOF;
	}
{'fraction_non_alphanumeric': 0.1184956208140134, 'fraction_numerical': 0.010303967027305513, 'mean_word_length': 3.623809523809524, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5359826', 'n_tokens_mistral': 690, 'n_tokens_neox': 650, 'n_words': 247}