#include <stdio.h>
#include <stdlib.h>
#include "openFile.h"
#include "getCharacter.h"

int 
openFile(FILE *fp, char *filename, int option)
{
  fp = fopen(filename, "r");
  if (fp == NULL)
    {
      fprintf(stderr, "No such file or directory\n");
      exit(EXIT_FAILURE);
    }
  else
    {
      getCharacters(fp, option);
    }
  return EXIT_SUCCESS;
}
