<commit_before>// Filename: pfstreamBuf.h
// Created by:  cary (12Dec00)
// 
////////////////////////////////////////////////////////////////////

#ifndef __PFSTREAMBUF_H__
#define __PFSTREAMBUF_H__

#include <dtoolbase.h>
#include <iostream>
#include <string>
#include <stdio.h>

#ifdef WIN32_VC
#define popen _popen
#define pclose _pclose
#endif

class EXPCL_DTOOL PipeStreamBuf : public streambuf {
public:
  enum Direction { Input, Output };

  PipeStreamBuf(Direction);
  virtual ~PipeStreamBuf(void);

  void flush();
  void command(const string);
protected:
  virtual int overflow(int c);
  virtual int sync(void);
  virtual int underflow(void);
private:
  Direction _dir;
  string _line_buffer;
  FILE* _pipe;

  void write_chars(const char*, int, bool);
};

#endif /* __PFSTREAMBUF_H__ */
<commit_msg>*** empty log message ***<commit_after>// Filename: pfstreamBuf.h
// Created by:  cary (12Dec00)
// 
////////////////////////////////////////////////////////////////////

#ifndef __PFSTREAMBUF_H__
#define __PFSTREAMBUF_H__

#include <dtoolbase.h>
#include <string>
#include <stdio.h>

#ifdef WIN32_VC
#define popen _popen
#define pclose _pclose
#endif

class EXPCL_DTOOL PipeStreamBuf : public streambuf {
public:
  enum Direction { Input, Output };

  PipeStreamBuf(Direction);
  virtual ~PipeStreamBuf(void);

  void flush();
  void command(const string);
protected:
  virtual int overflow(int c);
  virtual int sync(void);
  virtual int underflow(void);
private:
  Direction _dir;
  string _line_buffer;
  FILE* _pipe;

  void write_chars(const char*, int, bool);
};

#endif /* __PFSTREAMBUF_H__ */

{'fraction_non_alphanumeric': 0.1879652605459057, 'fraction_numerical': 0.007444168734491315, 'mean_word_length': 3.125319693094629, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '4533099', 'n_tokens_mistral': 540, 'n_tokens_neox': 525, 'n_words': 144}