<commit_before>#include <pito/interceptor/SystemCall.hpp>

extern "C" {

using namespace pito::interceptor;
using system_call::instance;

// #include "SystemCallsGenerated.hpp"

int open(const char *pathname, int flags, mode_t mode) {
    return instance<system_call::open>()(pathname, flags, mode);
}

int open64(const char *pathname, int flags, mode_t mode) {
    return instance<system_call::open>()(pathname, flags, mode);
}

}<commit_msg>make it even easier to wrap calls<commit_after>#include <pito/interceptor/SystemCall.hpp>
#include <iostream>

extern "C" {

using namespace pito::interceptor;

#define super(calltype)   system_call::instance<system_call:: calltype >()

int open(const char *pathname, int flags, mode_t mode) {
    std::cout << "wrapping open(" << pathname << ", " << flags << ", " << mode << ")\n";
    return super(open)(pathname, flags, mode);
}

int open64(const char *pathname, int flags, mode_t mode) {
    std::cout << "wrapping open64(" << pathname << ", " << flags << ", " << mode << ")\n";
    return super(open)(pathname, flags, mode);
}

}
{'fraction_non_alphanumeric': 0.16620241411327763, 'fraction_numerical': 0.005571030640668524, 'mean_word_length': 5.125, 'pattern_counts': {'":': 0, '<': 37, '<?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': '4136714', 'n_tokens_mistral': 363, 'n_tokens_neox': 358, 'n_words': 92}