From 5b7b330616b765c648d7d689403698223e9fee8e Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 14 Jul 2013 11:07:24 +0200 Subject: [PATCH] Retire engine Tag It is somewhat redundant and could make SF name too long, so use just Version, in case of a signature build Version will be set to 'sig-xxx' otherwise, if left empty, we fall back on usual date stamp. No functional change. --- src/Makefile | 2 +- src/misc.cpp | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile index 1e8a9c66..f1fcfdeb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -427,7 +427,7 @@ signature-build: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all @echo "Running benchmark for getting the signature ..." @$(SIGNBENCH) 2>&1 | grep 'Nodes searched' | grep -o ": .*" | tr -d ': ' > sign.txt - @sed -i -e 's,^,/static const string Tag/s/"\\(.*\\)"/",1' -e 's,$$,"/1,1' sign.txt + @sed -i -e 's,^,/static const string Version/s/"\\(.*\\)"/"sig-,1' -e 's,$$,"/1,1' sign.txt @sed -i -f sign.txt misc.cpp @rm sign.txt $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all diff --git a/src/misc.cpp b/src/misc.cpp index 2d14def3..16ae0a6b 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -30,11 +30,9 @@ using namespace std; -/// Version number. If Version is left empty, then Tag plus current -/// date, in the format DD-MM-YY, are used as a version number. - +/// Version number. If Version is left empty, then compile date, in the +/// format DD-MM-YY, is shown in engine_info. static const string Version = ""; -static const string Tag = ""; /// engine_info() returns the full name of the current Stockfish version. This @@ -48,14 +46,12 @@ const string engine_info(bool to_uci) { string month, day, year; stringstream s, date(__DATE__); // From compiler, format is "Sep 21 2008" - s << "Stockfish " << Version; + s << "Stockfish " << Version << setfill('0'); if (Version.empty()) { date >> month >> day >> year; - - s << Tag << string(Tag.empty() ? "" : " ") << setfill('0') << setw(2) << day - << setw(2) << (1 + months.find(month) / 4) << year.substr(2); + s << setw(2) << day << setw(2) << (1 + months.find(month) / 4) << year.substr(2); } s << (Is64Bit ? " 64" : "") -- 2.39.2