<commit_before>/*
** Copyright (c) 2002-2016, <NAME> <<EMAIL>>
** All rights reserved.
**
** This code is released under 2-clause BSD license. Please see the
** file at : https://github.com/libsndfile/libsamplerate/blob/master/COPYING
*/

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

#include "src_config.h"
#include "common.h"

static enum SRC_ERR linear_vari_process (SRC_STATE *state, SRC_DATA *data) ;
static void linear_reset (SRC_STATE *state) ;
static enum SRC_ERR linear_copy (SRC_STATE *from, SRC_STATE *to) ;

/*========================================================================================
*/

#define	LINEAR_MAGIC_MARKER	MAKE_MAGIC ('l', 'i', 'n', 'e', 'a', 'r')

#define	SRC_DEBUG	0

typedef struct
{	int		linear_magic_marker ;
	int		dirty ;
	long	in_count, in_used ;
	long	out_count, out_gen ;
	float	last_value [] ;
} LINEAR_DATA ;

/*----------------------------------------------------------------------------------------
*/<commit_msg>Convert last `dirty` field to bool<commit_after>/*
** Copyright (c) 2002-2016, <NAME> <<EMAIL>>
** All rights reserved.
**
** This code is released under 2-clause BSD license. Please see the
** file at : https://github.com/libsndfile/libsamplerate/blob/master/COPYING
*/

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

#include "src_config.h"
#include "common.h"

static enum SRC_ERR linear_vari_process (SRC_STATE *state, SRC_DATA *data) ;
static void linear_reset (SRC_STATE *state) ;
static enum SRC_ERR linear_copy (SRC_STATE *from, SRC_STATE *to) ;

/*========================================================================================
*/

#define	LINEAR_MAGIC_MARKER	MAKE_MAGIC ('l', 'i', 'n', 'e', 'a', 'r')

#define	SRC_DEBUG	0

typedef struct
{	int		linear_magic_marker ;
	bool	dirty ;
	long	in_count, in_used ;
	long	out_count, out_gen ;
	float	last_value [] ;
} LINEAR_DATA ;

/*----------------------------------------------------------------------------------------
*/
{'fraction_non_alphanumeric': 0.29607550919026326, 'fraction_numerical': 0.009935419771485345, 'mean_word_length': 3.3126338329764455, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4692416', 'n_tokens_mistral': 687, 'n_tokens_neox': 644, 'n_words': 171}