/* libsizzle/result.h - result codes
 
  Copyright (C) 1999, 2000 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
 
  This is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2, or (at your option)
  any later version.
  
  This software 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
  General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this package; see the file COPYING.  If not, write to the
  Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  MA 02111-1307, USA.  */

#ifndef __SIZZLE_RESULT_H__
#define __SIZZLE_RESULT_H__

#if HAVE_CONFIG_H
# include <config.h>
#endif 

/* Predefined values for functions and variables of type result_t.
  Only these should be used with that type.  */
#define RESULT_SUCCESS      0	/* All went right. */
#define RESULT_NOMEM        1	/* Out of memory. */
#define RESULT_INVALID      2	/* Invalid argument. */
#define RESULT_ACCESS       3	/* Access denied. */
#define RESULT_ERROR        4	/* An error occured. */
#define RESULT_EXCEPTION    5	/* Exception was thrown. */
#define RESULT_TOPLEVEL     6	/* Back to top level. */
#define RESULT_QUIT         7	/* Quit repl. */
#define RESULT_INTERRUPT    8	/* User interrupt. */
#define RESULT_REPEAT       9	/* Signal repeat request. */
#define RESULT_TAILAPPLY   10	/* Perform tail call.  */

/* Result type.  Synonym to int, makes function prototypes more
  readable.
 */
typedef int result_t;

#endif /* not __SIZZLE_RESULT_H__ */
