home · contact · privacy
Some further refactorisation and comments improvements in wincontrol library.
[plomrogue] / src / misc.h
index fad27f6a51e890b18aa675a710f23f8c3aa4833a..ddc6be6617c8b691fd06dd57365f5b1afa71b9d4 100644 (file)
@@ -14,8 +14,14 @@ struct Map;
 
 
 
-/* Returns message: "Trouble in ".parent." with ".child."." (try_*() helper) */
-extern char * trouble_msg(char * parent, char * child);
+/* Return 16-bit number pseudo-randomly generated via Linear Congruential
+ * Generator algorithm with some proven constants. Use instead of rand() to
+ * ensure portability of the same pseudo-randomness across systems.
+ */
+extern uint16_t rrand();
+
+/* Do exit_err() with message: "Trouble in ".parent." with ".child."." */
+extern void exit_trouble(uint8_t test, char * parent, char * child);
 
 /* Wrappers to malloc(), calloc() from function called "f" calling exit_err()
  * with trouble_msg() error message if necessary.