<commit_before>/************************************************************************************
**  
* @copyright (c) 2013-2100, ChengDu Duyer Technology Co., LTD. All Right Reserved.
*
*************************************************************************************/
/**
* @file		g_result.h
* @version     
* @brief      
* @author	duye
* @date		2013-11-15
* @note 
*
*  2. 2014-06-21 duye move to gohoop project 
*  1. 2013-11-15 duye Created this file
* 
*/

#pragma once

/** 
 * @brief result variable for successed
 */
#define G_YES   0

/** 
 * @brief result variable for failed
 */
#define G_NO    -1

/** 
 * base error code
 */
#define G_ERROR_GENERAL_BASE                -1000
#define G_ERROR_SYSTEM_BASE                 -2000
#define G_ERROR_UTILS_BASE                  -3000
#define G_ERROR_COMMON_BASE                 -4000

/** 
 * general error code
 */
#define G_ERROR_INVALID_PARAMETERS          (G_ERROR_GENERAL_BASE - 1)

/** 
 * gsystem error code
 */
#define G_ERROR_NO_FILE                     (G_ERROR_SYSTEM_BASE - 1)

#define IS_YES(_ret) ((ret) == G_YES)
#define IS_NO(_ret) ((ret) == G_NO)

#define IS_YES_R(_x) \
do \
{ \
	GResult _result = (_x); \
	if (_result == G_YES) \
	{ \
		return _result; \
	} \
} while(0)

#define IS_NO_R(_x) \
do \
{ \
	GResult _result = (_x); \
	if (_result == G_NO) \
	{ \
		return _result; \
	} \
} while(0)

#define IS_FAULT_R(_x, _ret) \
do \
{ \
	if ((_x) == 0) \
	{ \
		return (_ret); \
	} \
} while(0)

#define IS_NULL_R(_p) \
do \
{ \
	if ((_p) == NULL) \
	{ \
		return G_ERROR_INVALID_PARAMETERS; \
	} \
} while(0)<commit_msg>Update g_result.h<commit_after>/************************************************************************************
**  
* @copyright (c) 2013-2100, ChengDu Duyer Technology Co., LTD. All Right Reserved.
*
*************************************************************************************/
/**
* @file	    g_result.h
* @version     
* @brief      
* @author   duye
* @date	    2013-11-15
* @note 
*
*  2. 2014-06-21 duye move to gohoop project 
*  1. 2013-11-15 duye Created this file
* 
*/

#pragma once

/** 
 * @brief result variable for successed
 */
#define G_YES   0

/** 
 * @brief result variable for failed
 */
#define G_NO    -1

/** 
 * base error code
 */
#define G_ERROR_GENERAL_BASE                -1000
#define G_ERROR_SYSTEM_BASE                 -2000
#define G_ERROR_UTILS_BASE                  -3000
#define G_ERROR_COMMON_BASE                 -4000

/** 
 * general error code
 */
#define G_ERROR_INVALID_PARAMETERS          (G_ERROR_GENERAL_BASE - 1)

/** 
 * gsystem error code
 */
#define G_ERROR_NO_FILE                     (G_ERROR_SYSTEM_BASE - 1)

#define IS_YES(_ret) ((ret) == G_YES)
#define IS_NO(_ret) ((ret) == G_NO)

#define IS_YES_R(_x) \
do \
{ \
    GResult _result = (_x); \
    if (_result == G_YES) \
    { \
        return _result; \
    } \
} while(0)

#define IS_NO_R(_x) \
do \
{ \
    GResult _result = (_x); \
    if (_result == G_NO) \
    { \
        return _result; \
    } \
} while(0)

#define IS_FAULT_R(_x, _ret) \
do \
{ \
    if ((_x) == 0) \
    { \
        return (_ret); \
    } \
} while(0)

#define P_IS_NULL_R(_p) \
do \
{ \
    if ((_p) == NULL) \
    { \
    	return G_ERROR_INVALID_PARAMETERS; \
	} \
} while(0)

#define IS_NULL_R(_p) \
do \
{ \ 
    if ((_p) == NULL) \
    { \
        return; \
    } \
} while(0)
{'fraction_non_alphanumeric': 0.2364066193853428, 'fraction_numerical': 0.03516548463356974, 'mean_word_length': 2.331692913385827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5911690', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1232, 'n_words': 272}