From: Yann Dirson Date: Sun, 3 Nov 2013 14:00:16 +0000 (+0100) Subject: Use centralized version from configure.ac, drop use of separate patchlevel. X-Git-Url: http://winboard.nl/cgi-bin?p=gnushogi.git;a=commitdiff_plain;h=829c253a7cc2d3e1a9ed643485c1b1a92967b5df Use centralized version from configure.ac, drop use of separate patchlevel. --- diff --git a/configure.ac b/configure.ac index 5d16f66..9207671 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT([gnushogi],[1.4.0+],[https://savannah.gnu.org/bugs/?group=gnushogi]) -AC_CONFIG_SRCDIR([version.h]) +AC_CONFIG_SRCDIR([gnushogi/gnushogi.h]) AC_CONFIG_HEADER(config.h) ########## diff --git a/gnushogi/Makefile.in b/gnushogi/Makefile.in index 7b75816..4d6cc53 100644 --- a/gnushogi/Makefile.in +++ b/gnushogi/Makefile.in @@ -255,22 +255,22 @@ clean: gnushogi: $(GNUSHOGI_FILES) pat2inc: $(PAT2INCFILES) sizetest: sizetest.o -attacks.o: attacks.c gnushogi.h $(ROOT)/version.h -book.o: book.c gnushogi.h $(ROOT)/version.h -commondsp.o: commondsp.c gnushogi.h $(ROOT)/version.h -cursesdsp.o: cursesdsp.c gnushogi.h $(ROOT)/version.h -dspwrappers.o: dspwrappers.c gnushogi.h $(ROOT)/version.h -genmove.o: genmove.c gnushogi.h $(ROOT)/version.h -globals.o: globals.c gnushogi.h $(ROOT)/version.h -eval.o: eval.c eval.h gnushogi.h $(ROOT)/version.h $(SRCDIR)/pattern.h -init.o: init.c gnushogi.h $(ROOT)/version.h $(SRCDIR)/pattern.h -main.o: main.c gnushogi.h $(ROOT)/version.h +attacks.o: attacks.c gnushogi.h +book.o: book.c gnushogi.h +commondsp.o: commondsp.c gnushogi.h +cursesdsp.o: cursesdsp.c gnushogi.h +dspwrappers.o: dspwrappers.c gnushogi.h +genmove.o: genmove.c gnushogi.h +globals.o: globals.c gnushogi.h +eval.o: eval.c eval.h gnushogi.h $(SRCDIR)/pattern.h +init.o: init.c gnushogi.h $(SRCDIR)/pattern.h +main.o: main.c gnushogi.h makepattern.o: pattern.c gnushogi.h $(SRCDIR)/pattern.h pattern.o: pattern.c gnushogi.h $(SRCDIR)/pattern.h $(SRCDIR)/pattern.inc -rawdsp.o: rawdsp.c gnushogi.h $(ROOT)/version.h -search.o: search.c gnushogi.h $(ROOT)/version.h -tcontrl.o: tcontrl.c gnushogi.h $(ROOT)/version.h -util.o: util.c gnushogi.h $(ROOT)/version.h +rawdsp.o: rawdsp.c gnushogi.h +search.o: search.c gnushogi.h +tcontrl.o: tcontrl.c gnushogi.h +util.o: util.c gnushogi.h pat2inc.o: pat2inc.c $(SRCDIR)/pattern.h $(SRCDIR)/gnushogi.h sizetest.o: sizetest.c $(SRCDIR)/gnushogi.h $(SRCDIR)/eval.h gnushogi.bbk: gnushogi diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 14df54c..17a639a 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1093,13 +1093,13 @@ ListGame(void) dbuf[16] = '\0'; dbuf[19] = '\0'; - /* use format "CLp16.Jan01-020304B" when patchlevel is 16, + /* use format "CL.Jan01-020304B" when date is Jan 1 time is 02:03:04 program played white */ - sprintf(fname, "CLp%s.%s%s-%s%s%s%c", - patchlevel, dbuf + 4, dbuf + 8, dbuf + 11, dbuf + 14, + sprintf(fname, "CL.%s%s-%s%s%s%c", + dbuf + 4, dbuf + 8, dbuf + 11, dbuf + 14, dbuf + 17, ColorStr[computer][0]); /* replace space padding with 0 */ @@ -1118,7 +1118,7 @@ ListGame(void) exit(1); } - fprintf(fd, "gnushogi %sp%s game\n", version, patchlevel); + fprintf(fd, "gnushogi %s game\n", PACKAGE_VERSION); fputs(" score depth nodes time ", fd); fputs(" score depth nodes time\n", fd); diff --git a/gnushogi/cursesdsp.c b/gnushogi/cursesdsp.c index 10eeae6..b32181b 100644 --- a/gnushogi/cursesdsp.c +++ b/gnushogi/cursesdsp.c @@ -145,7 +145,7 @@ void ShowHeader(void) { gotoXY(TAB, 2); - printw("GNU Shogi %s (pl %s)", version, patchlevel); + printw("GNU Shogi %s", PACKAGE_VERSION); } @@ -388,7 +388,7 @@ void Curses_help(void) { Curses_ClearScreen(); - printw("GNU Shogi %sp%s command summary\n", version, patchlevel); + printw("GNU Shogi %s command summary\n", PACKAGE_VERSION); printw("-------------------------------" "---------------------------------\n"); printw("7g7f move from 7g to 7f quit Exit Shogi\n"); @@ -998,7 +998,7 @@ Curses_SelectLevel(char *sx) Curses_ClearScreen(); gotoXY(32, 2); - printw("GNU Shogi %sp%s", version, patchlevel); + printw("GNU Shogi %s", PACKAGE_VERSION); gotoXY(20, 4); printw(" 1. 40 moves in 5 minutes"); gotoXY(20, 5); diff --git a/gnushogi/gnushogi.h b/gnushogi/gnushogi.h index 64fb5b2..60cedaa 100644 --- a/gnushogi/gnushogi.h +++ b/gnushogi/gnushogi.h @@ -728,7 +728,6 @@ extern short balance[2]; extern small_short ChkFlag[], CptrFlag[], TesujiFlag[]; extern short Pscore[], Tscore[]; extern /*unsigned*/ short rehash; /* -1 is used as a flag --tpm */ -extern char version[], patchlevel[]; extern unsigned int ttbllimit; extern unsigned int TTadd; extern unsigned int ttblsize; diff --git a/gnushogi/main.c b/gnushogi/main.c index 4910c4c..2dd78b8 100644 --- a/gnushogi/main.c +++ b/gnushogi/main.c @@ -29,7 +29,6 @@ * */ -#include "version.h" #include "gnushogi.h" #include @@ -287,7 +286,7 @@ main (int argc, char **argv) #endif /* ttblsz */ case 'v': - fprintf(stderr, "gnushogi version %s patchlevel %s\n", version, patchlevel); + fprintf(stderr, "gnushogi version %s\n", PACKAGE_VERSION); exit(1); diff --git a/gnushogi/pat2inc.c b/gnushogi/pat2inc.c index 01e4538..956f5c2 100644 --- a/gnushogi/pat2inc.c +++ b/gnushogi/pat2inc.c @@ -31,7 +31,6 @@ * */ -#include "version.h" #include "gnushogi.h" #include "pattern.h" diff --git a/gnushogi/rawdsp.c b/gnushogi/rawdsp.c index 4125d47..e8e7b98 100644 --- a/gnushogi/rawdsp.c +++ b/gnushogi/rawdsp.c @@ -226,7 +226,7 @@ Raw_Initialize(void) # error "Need setlinebuf() or setvbuf() to compile gnushogi!" # endif #endif - printf("GNU Shogi %sp%s\n", version, patchlevel); + printf("GNU Shogi %s\n", PACKAGE_VERSION); } if (hard_time_limit) @@ -281,7 +281,7 @@ void Raw_help(void) { Raw_ClearScreen(); - printf("GNU Shogi %sp%s command summary\n", version, patchlevel); + printf("GNU Shogi %s command summary\n", PACKAGE_VERSION); printf("----------------------------------" "------------------------------\n"); fputs ("7g7f move from 7g to 7f quit Exit Shogi\n", stdout); diff --git a/gnushogi/sizetest.c b/gnushogi/sizetest.c index fd20378..d70f546 100644 --- a/gnushogi/sizetest.c +++ b/gnushogi/sizetest.c @@ -31,7 +31,6 @@ * */ -#include "version.h" #include "gnushogi.h" #include diff --git a/version.h b/version.h deleted file mode 100644 index c46edac..0000000 --- a/version.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * FILE: version.h - * - * Version information for GNU Shogi. - * - * ---------------------------------------------------------------------- - * Copyright (c) 1993, 1994, 1995 Matthias Mutz - * Copyright (c) 1999 Michael Vanier and the Free Software Foundation - * - * GNU SHOGI is based on GNU CHESS - * - * Copyright (c) 1988, 1989, 1990 John Stanback - * Copyright (c) 1992 Free Software Foundation - * - * This file is part of GNU SHOGI. - * - * GNU Shogi is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 3 of the License, - * or (at your option) any later version. - * - * GNU Shogi is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with GNU Shogi; see the file COPYING. If not, see - * . - * ---------------------------------------------------------------------- - * - */ - -#ifndef _VERSION_H_ -#define _VERSION_H_ - -char version[] = "1.4.0"; -char patchlevel[] = "0"; - -#endif /* _VERSION_H_ */ - diff --git a/xshogi/Makefile.in b/xshogi/Makefile.in index d884940..84aca20 100644 --- a/xshogi/Makefile.in +++ b/xshogi/Makefile.in @@ -145,7 +145,7 @@ clean: # xshogi: xshogi.o parser.o -xshogi.o: xshogi.c $(SRCDIR)/sysdeps.h $(SRCDIR)/xshogi.h $(SRCDIR)/bitmaps.h $(ROOT)/version.h ../config.h +xshogi.o: xshogi.c $(SRCDIR)/sysdeps.h $(SRCDIR)/xshogi.h $(SRCDIR)/bitmaps.h ../config.h parser.o: parser.c $(SRCDIR)/xshogi.h parser.c: parser.y scanner.c scanner.c: scanner.l diff --git a/xshogi/xshogi.c b/xshogi/xshogi.c index ff2bdc3..f88f39a 100644 --- a/xshogi/xshogi.c +++ b/xshogi/xshogi.c @@ -91,7 +91,6 @@ #include #include -#include "../version.h" #include "xshogi.h" #define BUF_SIZE 1024 @@ -1704,9 +1703,9 @@ CreatePlayerWindow(void) False, (XtEventHandler)EventProc, (XtPointer)(player == &remotePlayer)); - sprintf(buf, "xshogi version %s, patchlevel %s based on " + sprintf(buf, "xshogi version %s based on " "xboard version %s", - version, patchlevel, XBOARD_VERSION); + PACKAGE_VERSION, XBOARD_VERSION); /* * If there is to be a machine match, set it up.