function varargout=cosmo_warning(message, varargin)
% show a warning message; by default just once for each message
%
% cosmo_warning(message, ...)
% cosmo_warning(state)
% state=cosmo_warning()
%
% Inputs:
% message warning message to be shown, or one of:
% 'on' : show all warning messages
% 'off' : show no warning messages
% 'once' : show each warning message once [default]
% 'reset':
% ... if a warning message is provided according with
% placeholders as used in sprintf, then the subsequent
% arguments should contain their values
% state if a struct, then this queries or sets the state of
% cosmo_warning.
%
% Notes:
% - this function works more or less like matlab's warning function,
% except that by default each warning is just shown once.
%
% # For CoSMoMVPA's copyright information and license terms, #
% # see the COPYING file distributed with CoSMoMVPA. #