<commit_before>/*
	chtab - character table generator 

	Author: <NAME> (..tjalk!erikb)
	Modified by <NAME>
*/

#include <stdio.h> 

static char *RcsId = "$Header$";

#define MAXBUF	256
#define TABSIZE 257
#define COMCOM	'-'
#define FILECOM	'%'

int InputForm = 'c';
char OutputForm[MAXBUF] = "%s,\n";
char *Table[TABSIZE];
char *Name;
char *ProgCall;
int signedch = 0;
char *OutputName;
char *chroffsetfile = "charoffset.h";

main(argc, argv)
	char *argv[];
{
	char c = 0200;
	int i = c;

	if (i < 0) signedch = 1;

	ProgCall = *argv++;
	argc--;
	while (argc-- > 0) {
		if (**argv == COMCOM) {
			option(*argv++);
		}
		else {
			process(*argv++, InputForm);
		}
	}
	MkCharIndex();
}

MkCharIndex()
{
	FILE *fp;

	if ((fp = fopen(chroffsetfile, "w")) == NULL) {
		fprintf(stderr, "%s: cannot write file %s\n", ProgCall, chroffsetfile);
		exit(1);
	}
	if (signedch) {
		fputs("#define CharOffset	128\n");
	}
	else	fputs("#define CharOffset	0\n");
	fclose(fp);
}

char *
Salloc(s)
	char *s;
{
	char *malloc();
	char *ns = malloc(strlen(s) + 1);

	if (ns) {<commit_msg>Added an exit from main<commit_after>/*
	chtab - character table generator 

	Author: <NAME> (..tjalk!erikb)
	Modified by <NAME>
*/

#include <stdio.h> 

static char *RcsId = "$Header$";

#define MAXBUF	256
#define TABSIZE 257
#define COMCOM	'-'
#define FILECOM	'%'

int InputForm = 'c';
char OutputForm[MAXBUF] = "%s,\n";
char *Table[TABSIZE];
char *Name;
char *ProgCall;
int signedch = 0;
char *OutputName;
char *chroffsetfile = "charoffset.h";

main(argc, argv)
	char *argv[];
{
	char c = 0200;
	int i = c;

	if (i < 0) signedch = 1;

	ProgCall = *argv++;
	argc--;
	while (argc-- > 0) {
		if (**argv == COMCOM) {
			option(*argv++);
		}
		else {
			process(*argv++, InputForm);
		}
	}
	MkCharIndex();
	exit(0);
}

MkCharIndex()
{
	FILE *fp;

	if ((fp = fopen(chroffsetfile, "w")) == NULL) {
		fprintf(stderr, "%s: cannot write file %s\n", ProgCall, chroffsetfile);
		exit(1);
	}
	if (signedch) {
		fputs("#define CharOffset	128\n");
	}
	else	fputs("#define CharOffset	0\n");
	fclose(fp);
}

char *
Salloc(s)
	char *s;
{
	char *malloc();
	char *ns = malloc(strlen(s) + 1);

	if (ns) {
{'fraction_non_alphanumeric': 0.1928438661710037, 'fraction_numerical': 0.019052044609665426, 'mean_word_length': 3.731868131868132, 'pattern_counts': {'":': 0, '<': 11, '<?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': '62382', 'n_tokens_mistral': 991, 'n_tokens_neox': 920, 'n_words': 237}