<commit_before>#include "../header.h"

int printf(const char *format,...)
{
	const char *p;
	int i, count = 0;
	char *s;
	
	va_list list;
	va_start(list,format);
	
	for (p = format; *p != 0x00; p++) {
		if (*p != '%') {
			if (putchar(*p)) {
				count++;
			}
			continue;
		}
		
		switch (*++p) {
			case 'c':
				i = va_arg(list, int);
				if (putchar(i)) {
					count++;
				}
				break;
			
			case 's':
				s = va_arg(list, char*);
				count += puts(s);
				break;
		}
	}
	
	va_arg(list,int);
	
	va_end(list);
	return count;
}
<commit_msg>added %%, removed ifs and we're not using puts anymore.<commit_after>#include "../header.h"

int printf(const char *format,...)
{
	const char *p;
	int i, count = 0;
	char *s;
	
	va_list list;
	va_start(list,format);
	
	for (p = format; *p != 0x00; p++) {
		if (*p != '%') {
			putchar(*p);
			count++;
			continue;
		}
		
		switch (*++p) {
			case 'c':
				i = va_arg(list, int);
				putchar(i);
				count++;
				break;
			
			case 's':
				s = va_arg(list, char*);
				for(i = 0; s[i]; i++)
				{
					putchar(s[i]);
					count++;
				}
				break;
			
			case '%':
				putchar('%');
				count++;
				break;
		}
	}
	
	va_arg(list,int);
	
	va_end(list);
	return count;
}

{'fraction_non_alphanumeric': 0.20675453047775946, 'fraction_numerical': 0.007413509060955519, 'mean_word_length': 2.231382978723404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5793030', 'n_tokens_mistral': 646, 'n_tokens_neox': 504, 'n_words': 120}