From c8339f5d3a47edc67970ba72f53b1b3612285220 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Mon, 3 Jan 2000 16:49:28 +0000 Subject: [PATCH] Moved buildnum.c to common/ -- we don't use it any more, but we could. Also changed it so that the starting build number would be 21 Dec 1999, the date of the Q1 source release. Today would be build number 13. :) --- {qw_client => common}/buildnum.c | 40 +++++++++++++++++--------------- 1 file changed, 21 insertions(+), 19 deletions(-) rename {qw_client => common}/buildnum.c (51%) diff --git a/qw_client/buildnum.c b/common/buildnum.c similarity index 51% rename from qw_client/buildnum.c rename to common/buildnum.c index eac7d49..d972961 100644 --- a/qw_client/buildnum.c +++ b/common/buildnum.c @@ -1,29 +1,32 @@ /* -Copyright (C) 1996-1997 Id Software, Inc. + buildnum.c + + Build number (actually date) calculator + + Copyright (C) 1996-1997 Id Software, Inc. + Copyright (C) 1999-2000 The QuakeForge Project -This program 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 2 -of the License, or (at your option) any later version. - -This program 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 included (GNU.txt) GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + This program 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 2 + of the License, or (at your option) any later version. + + This program 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. + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include #include #include -// char *date = "Oct 24 1996"; -// char *time = "13:22:52"; +//char *date = "Dec 21 1999"; +//char *time = "00:00:00"; char *date = __DATE__ ; char *time = __TIME__ ; @@ -62,7 +65,7 @@ int build_number( void ) b += 1; } - b -= 34995; // Oct 24 1996 + b -= 36148; // Dec 21 1999 hr = (time[0] - '0') * 10 + (time[1] - '0'); min = (time[3] - '0') * 10 + (time[4] - '0'); @@ -73,4 +76,3 @@ int build_number( void ) return b; } -