<commit_before>/*
 * Copyright (C) 2014-2016 Wilddog Technologies. All Rights Reserved. 
 *
 * FileName: demo.c
 *
 * Description: Wilddog demo file.
 *
 * History:
 * Version      Author          Date        Description
 *
 * 0.4.3        Baikal.Hu       2015-07-16  Create file.
 *
 */

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h> 
#include "wilddog.h"

typedef enum _TEST_CMD_TYPE
{
    TEST_CMD_NON = 0,
    TEST_CMD_GET,
    TEST_CMD_SET,
    TEST_CMD_PUSH,
    TEST_CMD_DELE,
    TEST_CMD_ON,
    
}TEST_CMD_TYPE;

STATIC void test_getValueFunc
    (
    const Wilddog_Node_T* p_snapshot, 
    * arg, 
    Wilddog_Return_T err
    )
{
    if(err < WILDDOG_HTTP_OK || err >= WILDDOG_HTTP_NOT_MODIFIED)
    {
        wilddog_debug("getValue fail!");
        return;
    }
    *(BOOL*)arg = TRUE;

    if(p_snapshot)
        wilddog_debug_printnode(p_snapshot);
    printf("\ngetValue success!\n");

    return;
}

STATIC void test_removeValueFunc(void* arg, Wilddog_Return_T err)
{
    if(err < WILDDOG_HTTP_OK || err >= WILDDOG_HTTP_NOT_MODIFIED)
    {
        wilddog_debug("removeValue failed!");
        return ;
    }
    wilddog_debug("removeValue success!");
    *(BOOL*)arg = TRUE;<commit_msg>change API, merge from feature-apichange<commit_after>/*
 * Copyright (C) 2014-2016 Wilddog Technologies. All Rights Reserved. 
 *
 * FileName: demo.c
 *
 * Description: Wilddog demo file.
 *
 * History:
 * Version      Author          Date        Description
 *
 * 0.4.3        Baikal.Hu       2015-07-16  Create file.
 *
 */

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h> 
#include "wilddog.h"

typedef enum _TEST_CMD_TYPE
{
    TEST_CMD_NON = 0,
    TEST_CMD_GET,
    TEST_CMD_SET,
    TEST_CMD_PUSH,
    TEST_CMD_DELE,
    TEST_CMD_ON,
    
}TEST_CMD_TYPE;

STATIC void test_getValueFunc
    (
    const Wilddog_Node_T* p_snapshot, 
    void* arg, 
    Wilddog_Return_T err
    )
{
    if(err < WILDDOG_HTTP_OK || err >= WILDDOG_HTTP_NOT_MODIFIED)
    {
        wilddog_debug("getValue fail!");
        return;
    }
    *(BOOL*)arg = TRUE;

    if(p_snapshot)
        wilddog_debug_printnode(p_snapshot);
    printf("\ngetValue success!\n");

    return;
}

STATIC void test_removeValueFunc(void* arg, Wilddog_Return_T err)
{
    if(err < WILDDOG_HTTP_OK || err >= WILDDOG_HTTP_NOT_MODIFIED)
    {
        wilddog_debug("removeValue failed!");
        return ;
    }
    wilddog_debug("removeValue success!");
    *(BOOL*)arg = TRUE;
{'fraction_non_alphanumeric': 0.11446491571932575, 'fraction_numerical': 0.01568012544100353, 'mean_word_length': 2.775147928994083, 'pattern_counts': {'":': 0, '<': 17, '<?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': '3474848', 'n_tokens_mistral': 977, 'n_tokens_neox': 925, 'n_words': 180}