<commit_before>// Main
//
// (C) <NAME> 2002
//

#ifdef WIN32
# include <windows.h>
# include <winbase.h>
# include <direct.h>
# define getcwd _getcwd
# ifdef ERROR
#  undef ERROR
# endif
#else
# include <unistd.h>
#endif

#include <stdlib.h>
#include <sstream>
#include <string>
#include <iostream>

#define COPASI_MAIN
#define COPASI_TRACE_CONSTRUCTION

#include "copasi.h"
#include "utilities/CGlobals.h"
#include "COptionParser.h"
#include "COptions.h"

C_INT32 TestOptimization(void);

C_INT main(C_INT argc, char *argv[])
{
  char PrgName[512];

#ifdef WIN32
  GetModuleFileName(NULL, PrgName, 512);
#else
  strcpy(PrgName, argv[0]);
#endif
  std::cout << "Starting main program: " << PrgName << std::endl;
  Copasi = new CGlobals;

  std::string line;
  std::ifstream in(".copasirc");
  getline(in, line);

  try
    {
      COptions::init(argc, argv);
      std::cout << "Default: key1 = '" << COptions::getDefault("key1")
      << "'" << std::endl;
      std::cout << "Default: key2 = '" << COptions::getDefault("key2")
      << "'" << std::endl;
    }

  catch (copasi::autoexcept &e)
    {
      switch (e.get_autothrow_id())
        {
        case copasi::autothrow_help:
          std::cout << "Usage: " << argv[0] << " [options]\n";
          std::cout << e.what();
        }
    }

  catch (copasi::option_error &e)
    {
      std::cerr << argv[0] << ": " << e.what() << "\n";
      std::cerr << e.get_help_comment() << std::endl;
    }
<commit_msg>Fixes to work under Visual C++.<commit_after>// Main
//
// (C) <NAME> 2002
//

#ifdef WIN32
# include <windows.h>
# include <winbase.h>
# include <direct.h>
# define getcwd _getcwd
# ifdef ERROR
#  undef ERROR
# endif
#else
# include <unistd.h>
#endif

#include <stdlib.h>
#include <sstream>
#include <string>
#include <iostream>

#define COPASI_MAIN
#define COPASI_TRACE_CONSTRUCTION

#include "copasi.h"
#include "utilities/CGlobals.h"
#include "COptionParser.h"
#include "COptions.h"

C_INT32 TestOptimization(void);

C_INT main(C_INT argc, char *argv[])
{
  char PrgName[512];

#ifdef WIN32
  GetModuleFileName(NULL, PrgName, 512);
#else
  strcpy(PrgName, argv[0]);
#endif
  std::cout << "Starting main program: " << PrgName << std::endl;
  Copasi = new CGlobals;

  std::string line;
  std::ifstream in(".copasirc");
  std::getline(in, line);

  try
    {
      COptions::init(argc, argv);
      std::cout << "Default: key1 = '" << COptions::getDefault("key1")
      << "'" << std::endl;
      std::cout << "Default: key2 = '" << COptions::getDefault("key2")
      << "'" << std::endl;
    }

  catch (copasi::autoexcept &e)
    {
      switch (e.get_autothrow_id())
        {
        case copasi::autothrow_help:
          std::cout << "Usage: " << argv[0] << " [options]\n";
          std::cout << e.what();
        }
    }

  catch (copasi::option_error &e)
    {
      std::cerr << argv[0] << ": " << e.what() << "\n";
      std::cerr << e.get_help_comment() << std::endl;
    }

{'fraction_non_alphanumeric': 0.18794446325770403, 'fraction_numerical': 0.015577378936674569, 'mean_word_length': 3.2749638205499276, 'pattern_counts': {'":': 2, '<': 105, '<?xml version=': 0, '>': 21, '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': '5423024', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1121, 'n_words': 233}