//
// LiDIA - a library for computational number theory
//   Copyright (c) 1995 by the LiDIA Group
//
// File        : warning.c 
// Author      : Thomas Papanikolaou (TP)
// Last change : TP, Feb 7 1995, initial version
//

#include <LiDIA/lidia.h>

void default_warning_handler(char *f, char *m)
{
  cout << "\n warning_handler";
  cout << "::" << f;
  cout << "::" << m;
  cout << "\n";
  cout.flush();
}

warning_handler_ptr lidia_warning_handler = default_warning_handler;

warning_handler_ptr set_warning_handler(warning_handler_ptr new_handler)
{
  warning_handler_ptr old_handler = lidia_warning_handler;
  lidia_warning_handler = new_handler;
  return old_handler;
}
