(*********************************************************************************)

(*                Cameleon                                                       *)
(*                                                                               *)
(*    Copyright (C) 2005,2006 Institut National de Recherche en Informatique     *)
(*    et en Automatique. All rights reserved.                                    *)
(*                                                                               *)
(*    This program is free software; you can redistribute it and/or modify       *)
(*    it under the terms of the GNU Library General Public License as            *)
(*    published by the Free Software Foundation; either version 2 of the         *)
(*    License, or  any later version.                                            *)
(*                                                                               *)
(*    This program is distributed in the hope that it will be useful,            *)
(*    but WITHOUT ANY WARRANTY; without even the implied warranty of             *)
(*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *)
(*    GNU Library General Public License for more details.                       *)
(*                                                                               *)
(*    You should have received a copy of the GNU Library General Public          *)
(*    License along with this program; if not, write to the Free Software        *)
(*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA                   *)
(*    02111-1307  USA                                                            *)
(*                                                                               *)
(*    Contact: Maxence.Guesdon@inria.fr                                          *)
(*                                                                               *)
(*********************************************************************************)


(* $Id: cam_hooks.ml 488 2006-12-01 14:54:55Z zoggy $ *)

let f_display_message = ref prerr_endline
let f_warning_message = ref prerr_endline
let f_error_message = ref prerr_endline

let set_display_message f = f_display_message := f
let set_error_message f = f_error_message := f
let set_warning_message f = f_warning_message := f

let display_message s = !f_display_message s
let error_message s = !f_error_message s
let warning_message s = !f_warning_message s

let get_display_message () = !f_display_message
let get_error_message () = !f_error_message
let get_warning_message () = !f_warning_message