<commit_before>/*
 * oubuf.cc
 *
 *  Created on: Oct 5, 2008
 *      Author: jimg
 */


#include <iostream>
#include "outbuf.h"

int main()
{
    fdostream out(1);

    out << "31 hex:" << std::hex << 31 << std::endl;

    fdistream in(0);

    char c;
    for (int i = 0; i < 20; ++i) {
	in.get(c);

	std::cout << c << std::flush;

	if (i == 8) {
	    in.unget();
	    in.unget();
	}
    }

    std::cout << std::endl;

    return 0;
}
<commit_msg>Uses the new file descriptor stream classes - that is, it tests both input and output.<commit_after>/*
 * oubuf.cc
 *
 *  Created on: Oct 5, 2008
 *      Author: jimg
 */


#include <iostream>
#include "fdiostream.h"

int main()
{
    fdostream out(1);

    out << "31 hex:" << std::hex << 31 << std::endl;

    fdistream in(0);

    char c;
    for (int i = 0; i < 20; ++i) {
	in.get(c);

	std::cout << c << std::flush;

	if (i == 8) {
	    in.unget();
	    in.unget();
	}
    }

    std::cout << std::endl;

    return 0;
}

{'fraction_non_alphanumeric': 0.19589743589743588, 'fraction_numerical': 0.03282051282051282, 'mean_word_length': 2.2317880794701987, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 5, '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': '7182891', 'n_tokens_mistral': 435, 'n_tokens_neox': 390, 'n_words': 108}