<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src</tt></b></td></tr>
<tr><td><tt><a href="#file1">lxdream.h</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+10</td><td></td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">a8b798030464 -> 3f8f4c5b9ef4</td></tr>
</table>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Add first cut of error-reporting structure + macro
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>lxdream.h</b></big> <small id="info" style="color: #888888;" >a8b798030464 -> 3f8f4c5b9ef4</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/lxdream.h
+++ lxdream/src/lxdream.h
@@ -87,6 +87,16 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #define DEBUG( ... ) log_message( NULL, EMIT_DEBUG, MODULE_NAME, __VA_ARGS__ )
 #define TRACE( ... ) log_message( NULL, EMIT_TRACE, MODULE_NAME, __VA_ARGS__ )
 
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+/* Error reporting */
+#define MAX_ERROR_MSG_SIZE 512
+typedef struct error_struct {
+    unsigned int code;
+    char msg[MAX_ERROR_MSG_SIZE];
+} ERROR;
+
+#define SET_ERROR(err, n, ...) if( (err) != NULL ) { (err)->code = n; snprintf( (err)->msg, sizeof((err)->msg), __VA_ARGS__ ); }
+#define CLEAR_ERROR(err) do { err.code = 0; err.msg[0] = 0; } while(0)
+
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 #ifdef HAVE_FASTCALL
 #define FASTCALL __attribute__((regparm(2)))
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>