<commit_before>// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
#ifndef __GSL_COMMON_H__
#define __GSL_COMMON_H__
#include <bse/gsldefs.hh>
#include <bse/bseenums.hh>
G_BEGIN_DECLS
/* --- initialization --- */
void			gsl_init	(void);

#define	GSL_SPIN_LOCK	sfi_mutex_lock
#define	GSL_SPIN_UNLOCK	sfi_mutex_unlock
#define	GSL_SYNC_LOCK	sfi_mutex_lock
#define	GSL_SYNC_UNLOCK	sfi_mutex_unlock

/* --- misc --- */
const gchar* gsl_byte_order_to_string   (guint           byte_order);
guint        gsl_byte_order_from_string (const gchar    *string);
BseErrorType gsl_error_from_errno	(gint		 sys_errno,
					 BseErrorType	 fallback);
BseErrorType gsl_error_select           (guint           n_errors,
                                         BseErrorType    first_error,
                                         ...);
BseErrorType gsl_file_check		(const gchar	*file_name,
					 const gchar	*mode);
/* --- progress notification --- */
typedef struct _GslProgressState GslProgressState;
typedef guint (*GslProgressFunc)        (gpointer          data,
                                         gfloat            pval, /* -1, 0..100 */
                                         const gchar      *detail,
                                         GslProgressState *pstate);
struct _GslProgressState
{
  uint            wipe_length;
  int             precision;
  gfloat          pval, epsilon;
  gpointer        pdata;<commit_msg>BSE: remove mutex locking helpers<commit_after>// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
#ifndef __GSL_COMMON_H__
#define __GSL_COMMON_H__
#include <bse/gsldefs.hh>
#include <bse/bseenums.hh>
G_BEGIN_DECLS
/* --- initialization --- */
void			gsl_init	(void);

/* --- misc --- */
const gchar* gsl_byte_order_to_string   (guint           byte_order);
guint        gsl_byte_order_from_string (const gchar    *string);
BseErrorType gsl_error_from_errno	(gint		 sys_errno,
					 BseErrorType	 fallback);
BseErrorType gsl_error_select           (guint           n_errors,
                                         BseErrorType    first_error,
                                         ...);
BseErrorType gsl_file_check		(const gchar	*file_name,
					 const gchar	*mode);
/* --- progress notification --- */
typedef struct _GslProgressState GslProgressState;
typedef guint (*GslProgressFunc)        (gpointer          data,
                                         gfloat            pval, /* -1, 0..100 */
                                         const gchar      *detail,
                                         GslProgressState *pstate);
struct _GslProgressState
{
  uint            wipe_length;
  int             precision;
  gfloat          pval, epsilon;
  gpointer        pdata;
{'fraction_non_alphanumeric': 0.08318198329095532, 'fraction_numerical': 0.005085361423901199, 'mean_word_length': 1.748502994011976, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6766245', 'n_tokens_mistral': 865, 'n_tokens_neox': 820, 'n_words': 181}