<commit_before>#ifndef PNG_UTIL_H
#define PNG_UTIL_H

#include <stddef.h>

/* random shit goes here */

#define container_of(__ptr, __type, __member)   \
        ((__type *)((char *)(__ptr) - offsetof(__type, __member)))

#endif /* PNG_UTIL_H */<commit_msg>added a kernel-style BUG() macro to util.h that bails with a nice message if things go bad. (i.e., in the defaault of a switch statement that should never be hit)<commit_after>#ifndef PNG_UTIL_H
#define PNG_UTIL_H

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>

/* random shit goes here */

#define container_of(__ptr, __type, __member)   \
        ((__type *)((char *)(__ptr) - offsetof(__type, __member)))


#define BUG()                                                           \
        do {                                                            \
                fprintf(stderr, "BUG! %s:%d %s", __FILE__, __LINE__, __func__); \
                exit(1);                                                \
        } while (0);                                                    \

#endif /* PNG_UTIL_H */
{'fraction_non_alphanumeric': 0.11829944547134935, 'fraction_numerical': 0.0018484288354898336, 'mean_word_length': 1.5482352941176472, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2671248', 'n_tokens_mistral': 316, 'n_tokens_neox': 307, 'n_words': 88}