<commit_before>//----------------------------------------------------------------------
//  A TIFF ver.1.0.0            Time-stamp: <2016-11-13 09:38:42 kido>
//----------------------------------------------------------------------
#include <cstdio>
#include <cstdarg>
#include <iostream>
using namespace std;

#include <tiff.h>
#include <tiffio.h>

#include "atiff.h"

inline void OUTMSG(const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    char tmp[BUFSIZ];
    vsnprintf(tmp, sizeof(tmp), fmt, args);
    cout << tmp << endl;
    va_end(args);
}

inline void ERRMSG(const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    char tmp[BUFSIZ];
    vsnprintf(tmp, sizeof(tmp), fmt, args);
    cerr << tmp << endl;
    va_end(args);
}

#define ATIFF_STR(label)        #label
#define ATIFF_TAG_CONCAT(label) TIFFTAG_ ## label
#define ATIFF_GET_SAFE(label, var)\
    if(TIFFGetField(tif, ATIFF_TAG_CONCAT(label), &var) != 1) {\
    fprintf(stderr, "%s: cannot get %s\n",\
            filename.c_str(), ATIFF_STR(label));        \
        return false;\
    }
#define ATIFF_SET_SAFE(label, var)\
    if(TIFFSetField(tif, ATIFF_TAG_CONCAT(label), var) != 1) {\
        fprintf(stderr, "%s: cannot set %s\n",\
                filename.c_str(), ATIFF_STR(label));    \
        return false;\
    }

//----------------------------------------------------------------------
//  ATIFF : TIFF manipulate class
//----------------------------------------------------------------------
atiff::atiff() {
    this->initialize();
}

atiff::atiff(int width, int height, int ncolors, int ordering) {
    this->build(width, height, ncolors, ordering);
}

// atiff::~atiff() {<commit_msg>adjust indentation<commit_after>//----------------------------------------------------------------------
//  A TIFF ver.1.0.0            Time-stamp: <2016-11-13 09:38:42 kido>
//----------------------------------------------------------------------
#include <cstdio>
#include <cstdarg>
#include <iostream>
using namespace std;

#include <tiff.h>
#include <tiffio.h>

#include "atiff.h"

inline void OUTMSG(const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    char tmp[BUFSIZ];
    vsnprintf(tmp, sizeof(tmp), fmt, args);
    cout << tmp << endl;
    va_end(args);
}

inline void ERRMSG(const char* fmt, ...) {
    va_list args;
    va_start(args, fmt);
    char tmp[BUFSIZ];
    vsnprintf(tmp, sizeof(tmp), fmt, args);
    cerr << tmp << endl;
    va_end(args);
}

#define ATIFF_STR(label)        #label
#define ATIFF_TAG_CONCAT(label) TIFFTAG_ ## label
#define ATIFF_GET_SAFE(label, var)\
    if(TIFFGetField(tif, ATIFF_TAG_CONCAT(label), &var) != 1) {\
        fprintf(stderr, "%s: cannot get %s\n",\
                filename.c_str(), ATIFF_STR(label));\
        return false;\
    }
#define ATIFF_SET_SAFE(label, var)\
    if(TIFFSetField(tif, ATIFF_TAG_CONCAT(label),  var) != 1) {\
        fprintf(stderr, "%s: cannot set %s\n",\
                filename.c_str(), ATIFF_STR(label));\
        return false;\
    }

//----------------------------------------------------------------------
//  ATIFF : TIFF manipulate class
//----------------------------------------------------------------------
atiff::atiff() {
    this->initialize();
}

atiff::atiff(int width, int height, int ncolors, int ordering) {
    this->build(width, height, ncolors, ordering);
}

// atiff::~atiff() {
{'fraction_non_alphanumeric': 0.305473808122425, 'fraction_numerical': 0.011183048852266038, 'mean_word_length': 1.6575449569976544, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 19, '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': '1288109', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1079, 'n_words': 243}