Search
lxdream.org :: lxdream/src/lxdream.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/lxdream.h
changeset 1096:3f8f4c5b9ef4
prev1065:bc1cc0c54917
next1109:700c5ab26a63
author nkeynes
date Sun Jan 31 18:35:06 2010 +1000 (14 years ago)
permissions -rw-r--r--
last change Refactor CDROM host support
- Completely separate GDROM hardware (in gdrom/gdrom.c) from generic CDROM
support (now in drivers/cdrom)
- Add concept of 'sector sources' that can be mixed and matched to create
cdrom discs (makes support of arbitrary disc types much simpler)
file annotate diff log raw
1.1 --- a/src/lxdream.h Sun Jul 05 13:52:50 2009 +1000
1.2 +++ b/src/lxdream.h Sun Jan 31 18:35:06 2010 +1000
1.3 @@ -87,6 +87,16 @@
1.4 #define DEBUG( ... ) log_message( NULL, EMIT_DEBUG, MODULE_NAME, __VA_ARGS__ )
1.5 #define TRACE( ... ) log_message( NULL, EMIT_TRACE, MODULE_NAME, __VA_ARGS__ )
1.6
1.7 +/* Error reporting */
1.8 +#define MAX_ERROR_MSG_SIZE 512
1.9 +typedef struct error_struct {
1.10 + unsigned int code;
1.11 + char msg[MAX_ERROR_MSG_SIZE];
1.12 +} ERROR;
1.13 +
1.14 +#define SET_ERROR(err, n, ...) if( (err) != NULL ) { (err)->code = n; snprintf( (err)->msg, sizeof((err)->msg), __VA_ARGS__ ); }
1.15 +#define CLEAR_ERROR(err) do { err.code = 0; err.msg[0] = 0; } while(0)
1.16 +
1.17
1.18 #ifdef HAVE_FASTCALL
1.19 #define FASTCALL __attribute__((regparm(2)))
.