diff dmlib.h @ 26:2f463a59d732

Implement rudimentary resource system.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 29 Sep 2012 05:29:38 +0300
parents 10f58ff516b3
children f3407a58e01e
line wrap: on
line diff
--- a/dmlib.h	Fri Sep 28 15:45:50 2012 +0300
+++ b/dmlib.h	Sat Sep 29 05:29:38 2012 +0300
@@ -35,20 +35,22 @@
 enum {
 	// General error codes
 	DMERR_OK = 0,
+	DMERR_PROGRESS,     // Status OK, but operation in progress
+	
 	DMERR_FOPEN,
 	DMERR_FREAD,
 	DMERR_FWRITE,
 	DMERR_FSEEK,
-	DMERR_NOT_FOUND,
+	DMERR_NOT_FOUND,    // Resource/data not found
 
-	DMERR_INVALID_DATA,
-	DMERR_MALLOC,
-	DMERR_ALREADY_INIT,
-	DMERR_INIT_FAIL,
+	DMERR_INVALID_DATA, // Some data was invalid
+	DMERR_MALLOC,       // Memory allocation failure
+	DMERR_ALREADY_INIT, // Resource has already been initialized
+	DMERR_INIT_FAIL,    // General initialization failure
 	DMERR_INVALID_ARGS,
 
-	DMERR_NULLPTR,
-	DMERR_NOT_SUPPORTED,
+	DMERR_NULLPTR,      // NULL pointer specified in critical argument
+	DMERR_NOT_SUPPORTED,// Operation not supported
 	DMERR_OUT_OF_DATA,
 	DMERR_EXTRA_DATA,
 	DMERR_BOUNDS,