<commit_before>/**
 * @file 	  util.c
 * @author 	  <NAME>
 * @date      19 November 2015
 * @brief     Header file for internal libbad declarations
 * @copyright Copyright (c) 2015, <NAME>. Released under the MIT License.
 *            See LICENSE.txt for details.
 */

#include <stdio.h>

#include "util.h"

/**
 * @brief      Print an integer from a DATA
 *
 * @param      out   a pointer to the output file
 * @param      data  a pointer to a DATA
 */
void data_fprint_int(FILE* out, DATA data)
{
	fprintf(out, "%lld", data.data_int);
}<commit_msg>Implement data printing utility functions<commit_after>/**
 * @file 	  util.c
 * @author 	  <NAME>
 * @date      19 November 2015
 * @brief     Header file for internal libbad declarations
 * @copyright Copyright (c) 2015, <NAME>. Released under the MIT License.
 *            See LICENSE.txt for details.
 */

#include <stdio.h>

#include "util.h"

/**
 * @brief      Print an integer from a DATA
 *
 * @param      out   a pointer to the output file
 * @param      data  a DATA value
 */
void data_fprint_int(FILE* out, DATA data)
{
	fprintf(out, "%lld", data.data_int);
}

/**
 * @brief      Print a double from a DATA
 *
 * @param      out   a pointer to the output file
 * @param      data  a DATA value
 */
void data_fprint_dbl(FILE* out, DATA data)
{
	fprintf(out, "%Lf", data.data_dbl);
}

/**
 * @brief      Print a pointer from a DATA
 *
 * @param      out   a pointer to the output file
 * @param      data  a DATA value
 */
void data_fprint_ptr(FILE* out, DATA data)
{
	fprintf(out, "%p", data.data_ptr);
}

/**
 * @brief      Print a pointer from a DATA as a string
 *
 * @param      out   a pointer to the output file
 * @param      data  a DATA value
 */
void data_fprint_str(FILE* out, DATA data)
{
	fprintf(out, "%s", (char*) data.data_ptr);
}
{'fraction_non_alphanumeric': 0.11927112092766427, 'fraction_numerical': 0.011043622308117063, 'mean_word_length': 2.6312625250501003, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7501354', 'n_tokens_mistral': 618, 'n_tokens_neox': 596, 'n_words': 218}