<commit_before>#ifndef INPUT_AXIS_H
#define INPUT_AXIS_H

#include "../services.h"
#include <stdbool.h>

typedef struct {
	bool invert;
	bool enabled;

	/* Deadzone */
	double negative_deadzone;
	double positive_deadzone;

	/* Max/min */
	double negative_maximum;
	double positive_maximum;
} axis_config;

typedef struct {
	const char* name;
	double value;

	axis_config* settings;
} inputaxis;

typedef struct {
	size_t num_inputaxes;
	inputaxis* axes;
} inputaxis_data;

const axis_config* default_settings();

double get_input_for_axis(void*, const char*);
int update_axis_value(inputaxis_data*, const char* name, double val);

int create_axis(inputaxis_data*, const char* name, axis_config*);
int delete_axis(inputaxis_data*, const char* name, axis_config**);

axis_config* get_axis_settings(inputaxis_data*, const char* name);
int set_axis_settings(inputaxis_data*, const char* name, axis_config* settings);

input* create_inputaxis();
inputaxis_data* delete_inputaxis(input*);

#endif /* INPUT_AXIS_H */<commit_msg>Add new function to header<commit_after>#ifndef INPUT_AXIS_H
#define INPUT_AXIS_H

#include "../services.h"
#include <stdbool.h>

typedef struct {
	bool invert;
	bool enabled;

	/* Deadzone */
	double negative_deadzone;
	double positive_deadzone;

	/* Max/min */
	double negative_maximum;
	double positive_maximum;
} axis_config;

typedef struct {
	const char* name;
	double value;

	axis_config* settings;
} inputaxis;

typedef struct {
	size_t num_inputaxes;
	inputaxis* axes;
} inputaxis_data;

const axis_config* default_settings();

double get_input_for_axis(void*, const char*);
int update_axis_value(inputaxis_data*, const char* name, double val);
void reset_axis_values(inputaxis_data* d);

int create_axis(inputaxis_data*, const char* name, axis_config*);
int delete_axis(inputaxis_data*, const char* name, axis_config**);

axis_config* get_axis_settings(inputaxis_data*, const char* name);
int set_axis_settings(inputaxis_data*, const char* name, axis_config* settings);

input* create_inputaxis();
inputaxis_data* delete_inputaxis(input*);

#endif /* INPUT_AXIS_H */
{'fraction_non_alphanumeric': 0.10772163965681601, 'fraction_numerical': 0.0, 'mean_word_length': 6.5503597122302155, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '194451', 'n_tokens_mistral': 734, 'n_tokens_neox': 705, 'n_words': 179}