commit 1314edfc4be7f3c2f788bdb5a2116b694bb02b33
parent 8da2008d0055e2a6263de5ce82cce48c6299c7f0
Author: phoebos <ben@bvnf.space>
Date: Mon, 6 Jun 2022 16:44:56 +0100
write version number at top of debug file
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/uxndebug.c b/uxndebug.c
@@ -12,6 +12,8 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/
+#define UXNDEBUG_VERSION 1
+
#define TRIM 0x0100
#define LENGTH 0x10000
@@ -474,6 +476,9 @@ save_debug_info(char *srcname) {
if (debug_file == NULL)
return error(debug_filename, "Failed to open.");
+ /* write version number */
+ fprintf(debug_file, "%u%c%c", UXNDEBUG_VERSION, 0x0A, 0x0A);
+
/* Avoid writing '\n' because we can't depend on any particular representation. */
for (i = 0; i < p.length - TRIM; i++) {
if (dbg.tokens[i] == 0)