<commit_before>/**
 * @file ccndc.c
 * Bring up a link to another ccnd.
 *
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ccn/bloom.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/uri.h>
#include <ccn/face_mgmt.h>
#include <ccn/reg_mgmt.h>
#include <ccn/sockcreate.h>
#include <ccn/signing.h>
#include <ccn/keystore.h>

static void
usage(const char *progname)
{
    fprintf(stderr,
            "%s -f configfile\n"
            "   Read configfile and bring up links to other ccnd processes",
            progname);
    exit(1);
}

#define WITH_ERROR_CHECK(resval) chkres((resval), __LINE__)

static void
chkres(int res, int lineno)
{
    if (res >= 0)
        return;
    fprintf(stderr, "failure at "
                    "ccndc.c"
                    ":%d (res = %d)\n", lineno, res);
    exit(1);
}

int
main(int argc, char **argv)
{
    struct ccn *h = NULL;
    struct ccn_charbuf *name = NULL;
    struct ccn_charbuf *name_prefix = NULL;
    struct ccn_charbuf *newface = NULL;
    struct ccn_charbuf *prefixreg = NULL;
    struct ccn_charbuf *resultbuf = NULL;
    struct ccn_charbuf *temp = NULL;
    struct ccn_charbuf *templat = NULL;
    const unsigned char *ptr = NULL;
    size_t length = 0;
    const char *progname = NULL;
    const char *configfile = NULL;
    struct ccn_parsed_ContentObject pcobuf = {0};
    struct ccn_face_instance face_instance_storage = {0};
    struct ccn_face_instance *face_instance = &face_instance_storage;
    struct ccn_forwarding_entry forwarding_entry_storage = {0};
    struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
    struct ccn_charbuf *signed_info = NULL;
    struct ccn_charbuf *keylocator = NULL;
    struct ccn_keystore *keystore = NULL;
    long expire = -1;
    unsigned char ccndid_storage[32] = {0};
    const unsigned char *ccndid = NULL;
    size_t ccndid_size = 0;
    int res;
    char ch;<commit_msg>small fix to let ccndc compile so that we can run the C tests<commit_after>/**
 * @file ccndc.c
 * Bring up a link to another ccnd.
 *
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <ccn/bloom.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/uri.h>
#include <ccn/face_mgmt.h>
#include <ccn/reg_mgmt.h>
#include <ccn/sockcreate.h>
#include <ccn/signing.h>
#include <ccn/keystore.h>

static void
usage(const char *progname)
{
    fprintf(stderr,
            "%s -f configfile\n"
            "   Read configfile and bring up links to other ccnd processes",
            progname);
    exit(1);
}

#define WITH_ERROR_CHECK(resval) chkres((resval), __LINE__)

static void
chkres(int res, int lineno)
{
    if (res >= 0)
        return;
    fprintf(stderr, "failure at "
                    "ccndc.c"
                    ":%d (res = %d)\n", lineno, res);
    exit(1);
}

int
main(int argc, char **argv)
{
    struct ccn *h = NULL;
    struct ccn_charbuf *name = NULL;
    struct ccn_charbuf *name_prefix = NULL;
    struct ccn_charbuf *newface = NULL;
    struct ccn_charbuf *prefixreg = NULL;
    struct ccn_charbuf *resultbuf = NULL;
    struct ccn_charbuf *temp = NULL;
    struct ccn_charbuf *templat = NULL;
    const unsigned char *ptr = NULL;
    size_t length = 0;
    const char *progname = NULL;
    const char *configfile = NULL;
    struct ccn_parsed_ContentObject pcobuf = {0};
    struct ccn_face_instance face_instance_storage = {0};
    struct ccn_face_instance *face_instance = &face_instance_storage;
    struct ccn_forwarding_entry forwarding_entry_storage = {0};
    struct ccn_forwarding_entry *forwarding_entry = &forwarding_entry_storage;
    struct ccn_charbuf *signed_info = NULL;
    struct ccn_charbuf *keylocator = NULL;
    struct ccn_keystore *keystore = NULL;
    const char *arg = NULL;
    long expire = -1;
    unsigned char ccndid_storage[32] = {0};
    const unsigned char *ccndid = NULL;
    size_t ccndid_size = 0;
    int res;
    char ch;
{'fraction_non_alphanumeric': 0.11219879518072289, 'fraction_numerical': 0.006024096385542169, 'mean_word_length': 3.138110072689512, 'pattern_counts': {'":': 2, '<': 29, '<?xml version=': 0, '>': 31, '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': '1736279', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1435, 'n_words': 386}