filename | src/lxdream.h |
changeset | 1096:3f8f4c5b9ef4 |
prev | 1065:bc1cc0c54917 |
next | 1109:700c5ab26a63 |
author | nkeynes |
date | Fri Jun 04 09:13:40 2010 +1000 (13 years ago) |
permissions | -rw-r--r-- |
last change | Add ability to wrap a binary program up in a virtual cd image (so that we can boot it normally) |
file | annotate | diff | log | raw |
1.1 --- a/src/lxdream.h Sun Jul 05 13:52:50 2009 +10001.2 +++ b/src/lxdream.h Fri Jun 04 09:13:40 2010 +10001.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.7 +/* Error reporting */1.8 +#define MAX_ERROR_MSG_SIZE 5121.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.18 #ifdef HAVE_FASTCALL1.19 #define FASTCALL __attribute__((regparm(2)))
.