mojoshader.h
changeset 536 5af65fe6e917
parent 524 03eea2f0762c
child 552 40ca33bd5f88
--- a/mojoshader.h	Mon Feb 02 22:56:13 2009 -0500
+++ b/mojoshader.h	Tue Feb 03 00:31:34 2009 -0500
@@ -319,11 +319,7 @@
 } MOJOSHADER_symbol;
 
 
-/*
- * Structure used to return data from parsing of a shader...
- */
-/* !!! FIXME: most of these ints should be unsigned. */
-typedef struct MOJOSHADER_parseData
+typedef struct MOJOSHADER_error
 {
     /*
      * Human-readable error, if there is one. Will be NULL if there was no
@@ -333,6 +329,11 @@
     const char *error;
 
     /*
+     * Filename where error happened.
+     */
+    const char *filename;
+
+    /*
      * Position of error, if there is one. Will be -3 if there was no
      *  error, -2 if there was an error before processing started, and
      *  -1 if there was an error during final processing. If >= 0,
@@ -341,6 +342,25 @@
      *  a line number in the source code you supplied (starting at one).
      */
     int error_position;
+} MOJOSHADER_error;
+
+/*
+ * Structure used to return data from parsing of a shader...
+ */
+/* !!! FIXME: most of these ints should be unsigned. */
+typedef struct MOJOSHADER_parseData
+{
+    /*
+     * The number of elements pointed to by (errors).
+     */
+    int error_count;
+
+    /*
+     * (error_count) elements of data that specify errors that were generated
+     *  by parsing this shader.
+     * This can be NULL if there were no errors or if (error_count) is zero.
+     */
+    MOJOSHADER_error *errors;
 
     /*
      * The name of the profile used to parse the shader. Will be NULL on error.