<commit_before>/*
 * global.h
 *
 * Copyright (c) 1999, 2000, 2001
 *	<NAME> and <NAME>.
 *	All rights reserved.
 *
 * Copyright (c) 2004, 2005, 2006, 2008
 *	libchewing Core Team. See ChangeLog for details.
 *
 * See the file "COPYING" for information on usage and redistribution
 * of this file.
 */

#ifndef _CHEWING_GLOBAL_H
#define _CHEWING_GLOBAL_H

/*! \file global.h
 *  \brief Chewing Global Definitions
 *  \author libchewing Core Team
*/

#define CHINESE_MODE 1
#define SYMBOL_MODE 0
#define FULLSHAPE_MODE 1
#define HALFSHAPE_MODE 0

/* specified to Chewing API */
#ifdef WIN32
#define CHEWING_DLL_IMPORT __declspec(dllimport)
#   define CHEWING_DLL_EXPORT __declspec(dllexport)
#   ifdef CHEWINGDLL_EXPORTS
#      define CHEWING_API CHEWING_DLL_EXPORT
#      define CHEWING_PRIVATE
#   else
#      define CHEWING_API CHEWING_DLL_IMPORT
#      define CHEWING_PRIVATE
#   endif
#elif (__GNUC__ > 3) && defined(__ELF__)
#   define CHEWING_API __attribute__((__visibility__("default")))
#   define CHEWING_PRIVATE __attribute__((__visibility__("hidden")))
#else
#  define CHEWING_API
#  define CHEWING_PRIVATE
#endif

#ifndef UNUSED
#if defined(__GNUC__) /* gcc specific */
#   define UNUSED __attribute__((unused))
#else
#   define UNUSED
#endif
#endif

#define MAX_SELKEY 10

/**
 * @deprecated Use chewing_set_ series of functions to set parameters instead.
 */
typedef struct {
	int candPerPage;
	int maxChiSymbolLen;
	int selKey[ MAX_SELKEY ];
	int bAddPhraseForward;
	int bSpaceAsSelection;
	int bEscCleanAllBuf;
	int bAutoShiftCur;
	int bEasySymbolInput;
	int bPhraseChoiceRearward;
	/** @brief
            HSU_SELKEY_TYPE1 = <KEY>,
            HSU_SELKEY_TYPE2 = <KEY>.
         */
	int hsuSelKeyType;
} ChewingConfigData;

typedef struct {
	/*@{*/
	int from;	/**< starting position of certain interval */
	int to;		/**< ending position of certain interval */
	/*@}*/
} IntervalType;

typedef unsigned short uint16;

/** @brief context handle used for Chewing IM APIs
 */
typedef struct _ChewingContext ChewingContext;

/** @brief use "<KEY>" as selection key
 */
#define HSU_SELKEY_TYPE1 1

/** @brief use "<KEY>" as selection key
 */
#define HSU_SELKEY_TYPE2 2

#endif
<commit_msg>Extend Microsoft specific predefined macros from Win32 to Win64<commit_after>/*
 * global.h
 *
 * Copyright (c) 1999, 2000, 2001
 *	<NAME> and <NAME>.
 *	All rights reserved.
 *
 * Copyright (c) 2004, 2005, 2006, 2008
 *	libchewing Core Team. See ChangeLog for details.
 *
 * See the file "COPYING" for information on usage and redistribution
 * of this file.
 */

#ifndef _CHEWING_GLOBAL_H
#define _CHEWING_GLOBAL_H

/*! \file global.h
 *  \brief Chewing Global Definitions
 *  \author libchewing Core Team
*/

#define CHINESE_MODE 1
#define SYMBOL_MODE 0
#define FULLSHAPE_MODE 1
#define HALFSHAPE_MODE 0

/* specified to Chewing API */
#if defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)
#define CHEWING_DLL_IMPORT __declspec(dllimport)
#   define CHEWING_DLL_EXPORT __declspec(dllexport)
#   ifdef CHEWINGDLL_EXPORTS
#      define CHEWING_API CHEWING_DLL_EXPORT
#      define CHEWING_PRIVATE
#   else
#      define CHEWING_API CHEWING_DLL_IMPORT
#      define CHEWING_PRIVATE
#   endif
#elif (__GNUC__ > 3) && defined(__ELF__)
#   define CHEWING_API __attribute__((__visibility__("default")))
#   define CHEWING_PRIVATE __attribute__((__visibility__("hidden")))
#else
#  define CHEWING_API
#  define CHEWING_PRIVATE
#endif

#ifndef UNUSED
#if defined(__GNUC__) /* gcc specific */
#   define UNUSED __attribute__((unused))
#else
#   define UNUSED
#endif
#endif

#define MAX_SELKEY 10

/**
 * @deprecated Use chewing_set_ series of functions to set parameters instead.
 */
typedef struct {
	int candPerPage;
	int maxChiSymbolLen;
	int selKey[ MAX_SELKEY ];
	int bAddPhraseForward;
	int bSpaceAsSelection;
	int bEscCleanAllBuf;
	int bAutoShiftCur;
	int bEasySymbolInput;
	int bPhraseChoiceRearward;
	/** @brief
            HSU_SELKEY_TYPE1 = <KEY>,
            HSU_SELKEY_TYPE2 = <KEY>.
         */
	int hsuSelKeyType;
} ChewingConfigData;

typedef struct {
	/*@{*/
	int from;	/**< starting position of certain interval */
	int to;		/**< ending position of certain interval */
	/*@}*/
} IntervalType;

typedef unsigned short uint16;

/** @brief context handle used for Chewing IM APIs
 */
typedef struct _ChewingContext ChewingContext;

/** @brief use "<KEY>" as selection key
 */
#define HSU_SELKEY_TYPE1 1

/** @brief use "<KEY>" as selection key
 */
#define HSU_SELKEY_TYPE2 2

#endif

{'fraction_non_alphanumeric': 0.09957768392976217, 'fraction_numerical': 0.021782618359635474, 'mean_word_length': 4.107832009080591, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, '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': '5063932', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1533, 'n_words': 440}