/*

file filter and accumulator test

             CREATOR: DAn williams
                DATE:
         DESCRIPTION: test the viewport class
            FILENAME: fileaccumtest.cpp
             STARTED: jan 22
    OPERATING SYSTEM: Linux
1st VERSION FINISHED:

*/


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

void Error( char * desc );

#include "accumulator2.h" // included by filefilter
#include "filefilter.h"
#include <conio.h>

//global variables

int main(int argc, char** argv)
{

  char *       tempbuff;
  Accumulator  buffer;
  FileFilter1  FFilter;
  
  FFilter.LoadFile( &buffer, "foo.bar" );

  // printf ("%s", buffer.Contents );  // cant do that anymore :-(


  tempbuff = new char[buffer.GetSize()+2];  // whats an error?
  buffer.ReadN( 0, tempbuff, buffer.GetSize());
  printf("%s", tempbuff );
  delete[] tempbuff;


  return ( 0 );
}


//subroutines


void Error( char * desc ){
  printf ("%s\n", desc);
  exit ( 0 );
}

