<commit_before>/* $Header$ */
/*
 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 * See the copyright notice in the ACK home directory, in the file "Copyright".
 */
/*	bts2str() turns a row of bytes b with length n into string s
	The ASCII set of characters is used.
	86/03/17 EHB
*/

#define is_print(c)	((unsigned)((c) - ' ') <= '~' - ' ')

char *
bts2str(b, n, s)
	char *b, *s;
	register int n;
{
	register char *f = b, *t = s;

	while (n-- > 0) {
		if (is_print(*f))
			*t++ = *f++;
		else {
			register char *p;
			register int n = (*f++ & 0377);

			*t = '\\';
			p = (t += 4);
			*--p = (n & 07) + '0';
			n >>= 3;
			*--p = (n & 07) + '0';
			n >>= 3;
			*--p = (n & 07) + '0';
			n >>= 3;
		}
	}
	*t = '\000';
	return s;
}<commit_msg>code improvement<commit_after>/* $Header$ */
/*
 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
 * See the copyright notice in the ACK home directory, in the file "Copyright".
 */
/*	bts2str() turns a row of bytes b with length n into string s
	The ASCII set of characters is used.
	86/03/17 EHB
*/

#define is_print(c)	((unsigned)((c) - ' ') <= '~' - ' ')

char *
bts2str(b, n, s)
	char *b, *s;
	register int n;
{
	register char *f = b, *t = s;

	while (n-- > 0) {
		if (is_print(*f))
			*t++ = *f++;
		else {
			*t++ = '\\';
			*t++ = ((*f >> 6) & 03) + '0';
			*t++ = ((*f >> 3) & 07) + '0';
			*t++ = (*f++ & 07) + '0';
		}
	}
	*t = '\000';
	return s;
}
{'fraction_non_alphanumeric': 0.2242798353909465, 'fraction_numerical': 0.0411522633744856, 'mean_word_length': 2.4821002386634845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '5297170', 'n_tokens_mistral': 706, 'n_tokens_neox': 618, 'n_words': 202}