<commit_before>#include "eina_module.h"
#include "eina_file.h"
#include "eina_private.h"

#include <dirent.h>
#include <string.h>
#include <dlfcn.h>
/*============================================================================*
 *                                  Local                                     * 
 *============================================================================*/
struct _Eina_Module
{
#ifdef DEBUG
	unsigned int magic;
#endif
	void *handle;
	char *file;
};

#define MODULE_EXTENSION ".so"


typedef struct _Dir_List_Get_Cb_Data
{
	Eina_Module_Cb cb;
	void *data;
	Eina_List *list;
} Dir_List_Get_Cb_Data;

typedef struct _Dir_List_Cb_Data
{
	Eina_Module_Cb cb;
	void *data;
} Dir_List_Cb_Data;

static int _dir_list_get_cb(Eina_Module *m, void *data)
{
	Dir_List_Get_Cb_Data *cb_data = data;
	int ret = 1;
	
	if (cb_data->cb)
	{
		ret = cb_data->cb(m, cb_data->data);
	}
	if (ret)
	{
		cb_data->list = eina_list_append(cb_data->list, m);
	}
}

static void _dir_list_cb(const char *name, const char *path, void *data)
{
	Dir_List_Cb_Data *cb_data = data;
	int length;

	length = strlen(name);
	if (length < strlen(MODULE_EXTENSION) + 1) /* x.so */
		return;
	if (!strcmp(name + length - strlen(MODULE_EXTENSION),
			MODULE_EXTENSION))
	{<commit_msg>Fix some warning.<commit_after>#include "eina_module.h"
#include "eina_file.h"
#include "eina_private.h"

#include <dirent.h>
#include <string.h>
#include <dlfcn.h>
/*============================================================================*
 *                                  Local                                     * 
 *============================================================================*/
struct _Eina_Module
{
#ifdef DEBUG
	unsigned int magic;
#endif
	void *handle;
	char *file;
};

#define MODULE_EXTENSION ".so"


typedef struct _Dir_List_Get_Cb_Data
{
	Eina_Module_Cb cb;
	void *data;
	Eina_List *list;
} Dir_List_Get_Cb_Data;

typedef struct _Dir_List_Cb_Data
{
	Eina_Module_Cb cb;
	void *data;
} Dir_List_Cb_Data;

static int _dir_list_get_cb(Eina_Module *m, void *data)
{
	Dir_List_Get_Cb_Data *cb_data = data;
	int ret = 1;
	
	if (cb_data->cb)
	{
		ret = cb_data->cb(m, cb_data->data);
	}
	if (ret)
	{
		cb_data->list = eina_list_append(cb_data->list, m);
	}

	return ret;
}

static void _dir_list_cb(const char *name, const char *path, void *data)
{
	Dir_List_Cb_Data *cb_data = data;
	unsigned int length;

	length = strlen(name);
	if (length < strlen(MODULE_EXTENSION) + 1) /* x.so */
		return;
	if (!strcmp(name + length - strlen(MODULE_EXTENSION),
			MODULE_EXTENSION))
	{
{'fraction_non_alphanumeric': 0.22877084141139978, 'fraction_numerical': 0.0015509887553315238, 'mean_word_length': 3.952015355086372, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '474548', 'n_tokens_mistral': 994, 'n_tokens_neox': 948, 'n_words': 197}