<commit_before>/*
** OCRe - The ultimate OCR - HUGE Software
** OCRe is a project developed by 2nd year EPITA students
** - website: http://huge.ocre.free.fr/
** - svn repository: http://code.google.com/p/ocre
**
** About this folder: /extraction
**   OCRec is the character extraction part of OCRe.
** About this file: /extraction/launch.c
**   This file contains functions which start the extraction
**   process.
*/

#include <stdlib.h>
#include "structures.h"
#include "init.h"
#include "process.h"
#include "event.h"
#include "SDL/SDL.h"
#include "infos.h"
#include "tools.h"

/*
** This function starts the extraction process with
** the display option.
*/
void launchProgramWithDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;
  
  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if (is_bmp(infos->inFile))
	{
	  InitSDL(screen,1);
	  /* Process */
	  waitLoop();
	  SDL_Quit();
	}
      else
	{
	  help("extract");
	  free(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}

/*
** This function starts the extraction process without
** the display option.
*/
void launchProgramWithoutDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;
  
  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if is_bmp(infos->inFile))
	{
	  InitSDL(screen,0);
	  processAll(infos);
	  SDL_Quit();
	  printf("SDL closed.\n");
	}
      else
	{
	  help("extract");
	  free(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}
<commit_msg>Ca devrait etre bon<commit_after>/*
** OCRe - The ultimate OCR - HUGE Software
** OCRe is a project developed by 2nd year EPITA students
** - website: http://huge.ocre.free.fr/
** - svn repository: http://code.google.com/p/ocre
**
** About this folder: /extraction
**   OCRec is the character extraction part of OCRe.
** About this file: /extraction/launch.c
**   This file contains functions which start the extraction
**   process.
*/

#include <stdlib.h>
#include "structures.h"
#include "init.h"
#include "process.h"
#include "event.h"
#include "SDL/SDL.h"
#include "infos.h"
#include "tools.h"

/*
** This function starts the extraction process with
** the display option.
*/
void launchProgramWithDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;
  
  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if (is_bmp(infos->inFile))
	{
	  InitSDL(screen,1);
	  /* Process */
	  waitLoop();
	  SDL_Quit();
	}
      else
	{
	  help("extract");
	  free(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}

/*
** This function starts the extraction process without
** the display option.
*/
void launchProgramWithoutDisplay(t_launch_infos *infos)
{
  SDL_Surface *screen;
  
  screen = NULL;
  if (infos->inFile != NULL && infos->outFile != NULL)
    {
      if (is_bmp(infos->inFile))
	{
	  InitSDL(screen,0);
	  processAll(infos);
	  SDL_Quit();
	  printf("SDL closed.\n");
	}
      else
	{
	  help("extract");
	  free(infos);
	  exit(EXIT_SUCCESS);
	}
    }
}

{'fraction_non_alphanumeric': 0.15112756647593403, 'fraction_numerical': 0.002019522046449007, 'mean_word_length': 3.307246376811594, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '2838259', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1062, 'n_words': 259}