<commit_before># include "kfun.h"
# include "table.h"

/*
 * prototypes
 */
# define FUNCDEF(name, func, proto)	extern int func(); extern char proto[];
# include "builtin.c"
# include "std.c"
# include "file.c"
# include "extra.c"
# include "debug.c"
# ifdef KF_PACKAGE1
# include KF_PACKAGE1
# endif
# ifdef KF_PACKAGE2
# include KF_PACKAGE2
# endif
# ifdef KF_PACKAGE3
# include KF_PACKAGE3
# endif
# ifdef KF_PACKAGE4
# include KF_PACKAGE4
# endif
# ifdef KF_PACKAGE5
# include KF_PACKAGE5
# endif
# ifdef KF_PACKAGE6
# include KF_PACKAGE6
# endif
# undef FUNCDEF

/*
 * kernel function table
 */
kfunc kftab[] = {
# define FUNCDEF(name, func, proto)	{ name, func, proto },
# include "builtin.c"
# include "std.c"
# include "file.c"
# include "extra.c"
# include "debug.c"
# ifdef KF_PACKAGE1
# include KF_PACKAGE1
# endif
# ifdef KF_PACKAGE2
# include KF_PACKAGE2
# endif
# ifdef KF_PACKAGE3
# include KF_PACKAGE3
# endif
# ifdef KF_PACKAGE4
# include KF_PACKAGE4
# endif
# ifdef KF_PACKAGE5
# include KF_PACKAGE5
# endif
# ifdef KF_PACKAGE6
# include KF_PACKAGE6
# endif
# undef FUNCDEF
};

/*
 * NAME:	kfun->cmp()
 * DESCRIPTION:	compare two kftable entries
 */
static int kf_cmp(kf1, kf2)
kfunc *kf1, *kf2;
{
    return strcmp(kf1->name, kf2->name);
}

/*
 * NAME:	kfun->init()
 * DESCRIPTION:	initialize the kfun table
 */
void kf_init()
{
    qsort(kftab + KF_BUILTINS, sizeof(kftab) / sizeof(kfunc) - KF_BUILTINS,
	  sizeof(kfunc), kf_cmp);
}

/*
 * NAME:	kfun->func()<commit_msg>1.0.a4<commit_after># include "kfun.h"
# include "table.h"

/*
 * prototypes
 */
# define FUNCDEF(name, func, proto)	extern int func(); extern char proto[];
# include "builtin.c"
# include "std.c"
# include "file.c"
# include "extra.c"
# include "debug.c"
# undef FUNCDEF

/*
 * kernel function table
 */
kfunc kftab[] = {
# define FUNCDEF(name, func, proto)	{ name, func, proto },
# include "builtin.c"
# include "std.c"
# include "file.c"
# include "extra.c"
# include "debug.c"
# undef FUNCDEF
};

/*
 * NAME:	kfun->cmp()
 * DESCRIPTION:	compare two kftable entries
 */
static int kf_cmp(kf1, kf2)
kfunc *kf1, *kf2;
{
    return strcmp(kf1->name, kf2->name);
}

/*
 * NAME:	kfun->init()
 * DESCRIPTION:	initialize the kfun table
 */
void kf_init()
{
    qsort(kftab + KF_BUILTINS, sizeof(kftab) / sizeof(kfunc) - KF_BUILTINS,
	  sizeof(kfunc), kf_cmp);
}

/*
 * NAME:	kfun->func()
{'fraction_non_alphanumeric': 0.14917825537294563, 'fraction_numerical': 0.01643489254108723, 'mean_word_length': 4.083511777301927, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '4578535', 'n_tokens_mistral': 1040, 'n_tokens_neox': 1009, 'n_words': 233}