mojoshader_internal.h
changeset 945 f00ea3986db8
parent 944 9f9fa9650772
child 946 16fec3a3f687
--- a/mojoshader_internal.h	Tue Nov 09 05:00:03 2010 -0500
+++ b/mojoshader_internal.h	Tue Nov 09 05:05:41 2010 -0500
@@ -194,24 +194,9 @@
 void stringcache_destroy(StringCache *cache);
 
 
-// We chain errors as a linked list with a head/tail for easy appending.
-//  These get flattened before passing to the application.
-typedef struct ErrorItem
-{
-    MOJOSHADER_error error;
-    struct ErrorItem *next;
-} ErrorItem;
+// Error lists...
 
-typedef struct ErrorList
-{
-    ErrorItem head;
-    ErrorItem *tail;
-    int count;
-    MOJOSHADER_malloc m;
-    MOJOSHADER_free f;
-    void *d;
-} ErrorList;
-
+typedef struct ErrorList ErrorList;
 ErrorList *errorlist_create(MOJOSHADER_malloc m, MOJOSHADER_free f, void *d);
 int errorlist_add(ErrorList *list, const char *fname,
                       const int errpos, const char *str);
@@ -219,6 +204,7 @@
                       const int errpos, const char *fmt, ...) ISPRINTF(4,5);
 int errorlist_add_va(ErrorList *list, const char *_fname,
                      const int errpos, const char *fmt, va_list va);
+int errorlist_count(ErrorList *list);
 MOJOSHADER_error *errorlist_flatten(ErrorList *list); // resets the list!
 void errorlist_destroy(ErrorList *list);