Error reporting.

XY_err XY_errcode (void)
 Gets the most recent error code.
const char * XY_errstr (void)
 Gets a string representing the most recent error code.
void XY_print_options (FILE *fi, XY_options opts)
 Dumps options in opts to the file stream (eg, stderr or an opened logfile).

Enumerations

enum  XY_err {
  XY_ERR_NONE,
  XY_ERR_OPTION_BAD,
  XY_ERR_OPTION_UNKNOWN,
  XY_ERR_FILE_CANT_OPEN,
  XY_ERR_MEM_CANT_ALLOC,
  XY_ERR_INIT_VIDEO,
  XY_ERR_INIT_DISPLAY,
  XY_ERR_INIT_UNSUPPORTED_BPP,
  XY_ERR_BITMAP_CANT_DECODE,
  XY_ERR_BITMAP_CANT_CONVERT,
  XY_ERR_BITMAP_CANT_SCALE,
  XY_ERR_LINES_INVALID,
  NUM_XY_ERRS
}

Enumeration Type Documentation

enum XY_err

Enumerator:
XY_ERR_NONE  No error.
XY_ERR_OPTION_BAD  Bad value to an option.
XY_ERR_OPTION_UNKNOWN  Unrecognized option.
XY_ERR_FILE_CANT_OPEN  Cannot open file.
XY_ERR_MEM_CANT_ALLOC  Cannot allocate memory.
XY_ERR_INIT_VIDEO  Cannot initialize video subsystem.
XY_ERR_INIT_DISPLAY  Cannot open display.
XY_ERR_INIT_UNSUPPORTED_BPP  Unsupported (so far as we're concerned) bpp.
XY_ERR_BITMAP_CANT_DECODE  Error decoding image file (IMG_Load failed).
XY_ERR_BITMAP_CANT_CONVERT  Cannot convert a surface to the display fmt.

XY_ERR_BITMAP_CANT_SCALE  Cannot scale an image (probably mem.

alloc. fail)

XY_ERR_LINES_INVALID  Invalid (NULL?) group of lines.
NUM_XY_ERRS 


Function Documentation

XY_err XY_errcode ( void   ) 

Gets the most recent error code.

Returns:
the latest error code value.

const char* XY_errstr ( void   ) 

Gets a string representing the most recent error code.

Returns:
a string containing a human-readable message describing the latest error code value.

void XY_print_options ( FILE *  fi,
XY_options  opts 
)

Dumps options in opts to the file stream (eg, stderr or an opened logfile).

Parameters:
fi is a file pointer to output to (stderr or stdout could be used, or a file that you've opened for write or append using fopen())
opts is a pointer to an options structure that has been filled.


Generated on Sat Aug 16 22:15:09 2008 for libcrtxy by  doxygen 1.5.5