ref: e5ea84bb37694b5474fbf6073cc5852a14d68f8b
parent: 0a01d63f476aa04ecbfd563044288b3d605f6456
author: zamfofex <zamfofex@twdb.moe>
date: Wed Oct 18 20:52:03 EDT 2023
small changes
--- a/main.c
+++ b/main.c
@@ -77,6 +77,7 @@
" `-- *\n\n"
);
+ ctx->argv0 = argv[0];
moonfish_chess(&ctx->chess);
for (;;)
--- a/moonfish.h
+++ b/moonfish.h
@@ -55,6 +55,7 @@
{struct moonfish_nnue nnue;
struct moonfish_chess chess;
+ char *argv0;
};
struct moonfish_move
--- a/search.c
+++ b/search.c
@@ -88,7 +88,7 @@
return alpha;
}
-#if MOONFISH_HAS_PTHREAD
+#ifdef MOONFISH_HAS_PTHREAD
#include <stdlib.h>
#include <string.h>
@@ -148,7 +148,7 @@
if (result)
{free(infos);
- fprintf(stderr, "moonfish: %s\n", strerror(result));
+ fprintf(stderr, "%s: %s\n", ctx->argv0, strerror(result));
exit(1);
}
@@ -164,7 +164,7 @@
if (result)
{free(infos);
- fprintf(stderr, "moonfish: %s\n", strerror(result));
+ fprintf(stderr, "%s: %s\n", ctx->argv0, strerror(result));
exit(1);
}
--
⑨