Search
lxdream.org :: lxdream/src/lxdream.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/lxdream.h
changeset 1109:700c5ab26a63
prev1096:3f8f4c5b9ef4
next1159:580436b01b6c
author nkeynes
date Thu Jun 10 22:13:16 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change Integrate executable wrapping into the user interface
- command-line now loads wrapped by default, -e <bin> to run binary
- add support for .bin executables
- Add useful (internal) error codes
file annotate diff log raw
1.1 --- a/src/lxdream.h Sun Jan 31 18:30:13 2010 +1000
1.2 +++ b/src/lxdream.h Thu Jun 10 22:13:16 2010 +1000
1.3 @@ -94,8 +94,19 @@
1.4 char msg[MAX_ERROR_MSG_SIZE];
1.5 } ERROR;
1.6
1.7 +#define LX_ERR_NONE 0
1.8 +#define LX_ERR_NOMEM 1 /* Out-of-memory */
1.9 +#define LX_ERR_CONFIG 2 /* Configuration problem */
1.10 +#define LX_ERR_UNHANDLED 3 /* A lower-level error occurred which we don't understand */
1.11 +#define LX_ERR_BUG 4
1.12 +#define LX_ERR_FILE_NOOPEN 9 /* File could not be opened (ENOENT or EACCESS usually) */
1.13 +#define LX_ERR_FILE_IOERROR 10 /* I/O error encountered in file */
1.14 +#define LX_ERR_FILE_INVALID 11 /* File contents are invalid for its type */
1.15 +#define LX_ERR_FILE_UNKNOWN 12 /* File type is unrecognized */
1.16 +#define LX_ERR_FILE_UNSUP 13 /* File type is unsupported */
1.17 +
1.18 #define SET_ERROR(err, n, ...) if( (err) != NULL ) { (err)->code = n; snprintf( (err)->msg, sizeof((err)->msg), __VA_ARGS__ ); }
1.19 -#define CLEAR_ERROR(err) do { err.code = 0; err.msg[0] = 0; } while(0)
1.20 +#define CLEAR_ERROR(err) do { (err)->code = 0; (err)->msg[0] = 0; } while(0)
1.21
1.22
1.23 #ifdef HAVE_FASTCALL
.