<commit_before>/* matelib-init.c - Implement libmate module
   Copyright (C) 1997, 1998, 1999 Free Software Foundation
                 1999, 2000 Red Hat, Inc.
		 2001 SuSE Linux AG.
   All rights reserved.

   This file is part of MATE 2.0.

   The Mate Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The Mate Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the Mate Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */
/*
  @NOTATION@
 */

#include <config.h>
#include <errno.h>
#include <locale.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>

#include <glib.h>
#include <glib/gstdio.h>

#include "mate-i18n.h"
#include "mate-init.h"
#include "mate-mateconfP.h"
#include "mate-util.h"
#include "mate-sound.h"
#include "mate-triggers.h"
#include "libmate-private.h"

#include <matecomponent-activation/matecomponent-activation.h>
#include <matecomponent-activation/matecomponent-activation-version.h>
#include <libmatecomponent.h>

#include <libmatevfs/mate-vfs-init.h>

/* implemented in mate-sound.c */
G_GNUC_INTERNAL extern void _mate_sound_set_enabled (gboolean);

/*****************************************************************************
 * matecomponent
 *****************************************************************************/

static void
matecomponent_post_args_parse (MateProgram *program, MateModuleInfo *mod_info)
{
	int dumb_argc = 1;
	char *dumb_argv[] = {NULL};

	dumb_argv[0] = g_get_prgname ();

	matecomponent_init (&dumb_argc, dumb_argv);
}

/**
* mate_matecomponent_module_info_get:
*
* Retrieves the matecomponent module version and indicate that it requires the current
* libmate and its dependencies (although libmatecomponent does not depend on
* libmate, libmatecomponentui does and this will also be initialised when
* initialising a MATE app).
*
* Returns: a new #MateModuleInfo structure describing the version of the
* matecomponent modules and its dependents.
*/
const MateModuleInfo *
mate_matecomponent_module_info_get (void)
{
	static MateModuleInfo module_info = {
		"matecomponent",
		/* FIXME: get this from matecomponent */"1.101.2",
		N_("MateComponent Support"),
		NULL, NULL,
		NULL, matecomponent_post_args_parse,
		NULL, NULL, NULL, NULL, NULL
	};

	if (module_info.requirements == NULL) {
		static MateModuleRequirement req[2];

		req[0].required_version = VERSION;
		req[0].module_info = LIBMATE_MODULE;

		req[1].required_version = NULL;
		req[1].module_info = NULL;

		module_info.requirements = req;
	}

	return &module_info;
}

/*****************************************************************************
 * matecomponent-activation
 *****************************************************************************/

static void
matecomponent_activation_pre_args_parse (MateProgram *program, MateModuleInfo *mod_info)
{
        if (!g_thread_supported ())
		g_thread_init (NULL);
<commit_msg>fixed another old version requirement<commit_after>/* matelib-init.c - Implement libmate module
   Copyright (C) 1997, 1998, 1999 Free Software Foundation
                 1999, 2000 Red Hat, Inc.
		 2001 SuSE Linux AG.
   All rights reserved.

   This file is part of MATE 2.0.

   The Mate Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The Mate Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the Mate Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */
/*
  @NOTATION@
 */

#include <config.h>
#include <errno.h>
#include <locale.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>

#include <glib.h>
#include <glib/gstdio.h>

#include "mate-i18n.h"
#include "mate-init.h"
#include "mate-mateconfP.h"
#include "mate-util.h"
#include "mate-sound.h"
#include "mate-triggers.h"
#include "libmate-private.h"

#include <matecomponent-activation/matecomponent-activation.h>
#include <matecomponent-activation/matecomponent-activation-version.h>
#include <libmatecomponent.h>

#include <libmatevfs/mate-vfs-init.h>

/* implemented in mate-sound.c */
G_GNUC_INTERNAL extern void _mate_sound_set_enabled (gboolean);

/*****************************************************************************
 * matecomponent
 *****************************************************************************/

static void
matecomponent_post_args_parse (MateProgram *program, MateModuleInfo *mod_info)
{
	int dumb_argc = 1;
	char *dumb_argv[] = {NULL};

	dumb_argv[0] = g_get_prgname ();

	matecomponent_init (&dumb_argc, dumb_argv);
}

/**
* mate_matecomponent_module_info_get:
*
* Retrieves the matecomponent module version and indicate that it requires the current
* libmate and its dependencies (although libmatecomponent does not depend on
* libmate, libmatecomponentui does and this will also be initialised when
* initialising a MATE app).
*
* Returns: a new #MateModuleInfo structure describing the version of the
* matecomponent modules and its dependents.
*/
const MateModuleInfo *
mate_matecomponent_module_info_get (void)
{
	static MateModuleInfo module_info = {
		"matecomponent",
		/* FIXME: get this from matecomponent */"1.1.0",
		N_("MateComponent Support"),
		NULL, NULL,
		NULL, matecomponent_post_args_parse,
		NULL, NULL, NULL, NULL, NULL
	};

	if (module_info.requirements == NULL) {
		static MateModuleRequirement req[2];

		req[0].required_version = VERSION;
		req[0].module_info = LIBMATE_MODULE;

		req[1].required_version = NULL;
		req[1].module_info = NULL;

		module_info.requirements = req;
	}

	return &module_info;
}

/*****************************************************************************
 * matecomponent-activation
 *****************************************************************************/

static void
matecomponent_activation_pre_args_parse (MateProgram *program, MateModuleInfo *mod_info)
{
        if (!g_thread_supported ())
		g_thread_init (NULL);

{'fraction_non_alphanumeric': 0.17366946778711484, 'fraction_numerical': 0.014285714285714285, 'mean_word_length': 4.8389206868356505, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, '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': '4968493', 'n_tokens_mistral': 2255, 'n_tokens_neox': 2072, 'n_words': 676}