<commit_before>#include <comedi.h>

#include <libinternal.h>

int comedi_set_buffer_size(comedi_t *it, unsigned int subdev, unsigned int size)
{
	int ret;
	comedi_bufconfig bc;

	memset(&bc, 0, sizeof(bc));
	bc.subdevice = subdev;
	bc.size = size;
	ret = ioctl_bufconfig(it->fd, &bc);
	if(ret < 0) return ret;

	return bc.size;
}

int comedi_set_buffer_max_size(comedi_t *it, unsigned int subdev, unsigned int max_size)
{
	int ret;
	comedi_bufconfig bc;

	memset(&bc, 0, sizeof(bc));
	bc.subdevice = subdev;
	bc.maximum_size = max_size;
	ret = ioctl_bufconfig(it->fd, &bc);
	if(ret < 0) return ret;

	return bc.maximum_size;
}

int comedi_get_buffer_size(comedi_t *it, unsigned int subdev)
{
	return comedi_set_buffer_size(it, subdev, 0);
}

int comedi_get_buffer_contents(comedi_t *it, unsigned int subdev)
{
	return comedi_mark_buffer_read(it, subdev, 0);
}
<commit_msg>put back comedi_get_max_buffer_size<commit_after>#include <comedi.h>

#include <libinternal.h>

int comedi_set_buffer_size(comedi_t *it, unsigned int subdev, unsigned int size)
{
	int ret;
	comedi_bufconfig bc;

	memset(&bc, 0, sizeof(bc));
	bc.subdevice = subdev;
	bc.size = size;
	ret = ioctl_bufconfig(it->fd, &bc);
	if(ret < 0) return ret;

	return bc.size;
}

int comedi_set_max_buffer_size(comedi_t *it, unsigned int subdev, unsigned int max_size)
{
	int ret;
	comedi_bufconfig bc;

	memset(&bc, 0, sizeof(bc));
	bc.subdevice = subdev;
	bc.maximum_size = max_size;
	ret = ioctl_bufconfig(it->fd, &bc);
	if(ret < 0) return ret;

	return bc.maximum_size;
}

int comedi_get_max_buffer_size(comedi_t *it, unsigned int subdevice)
{
	return comedi_set_max_buffer_size(it, subdevice, 0);
}

int comedi_get_buffer_size(comedi_t *it, unsigned int subdev)
{
	return comedi_set_buffer_size(it, subdev, 0);
}

int comedi_get_buffer_contents(comedi_t *it, unsigned int subdev)
{
	return comedi_mark_buffer_read(it, subdev, 0);
}

{'fraction_non_alphanumeric': 0.1187961985216473, 'fraction_numerical': 0.006863780359028511, 'mean_word_length': 5.602787456445993, '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': '7503893', 'n_tokens_mistral': 794, 'n_tokens_neox': 772, 'n_words': 176}