reverted 2008-01-27T19:08:20Z!paniemin@cc.hut.fi
This commit is contained in:
parent
e5fa47807b
commit
f27aabae7a
11 changed files with 11 additions and 123 deletions
|
@ -47,7 +47,6 @@ Version 1.3.14+svn:
|
|||
* fixed adjacent units to update if unit affects them
|
||||
* converted NO_MAP_DATA to new map format
|
||||
* fixed unchecked vector access
|
||||
* made SVNREV not to recompile all everytime
|
||||
* make sure the python campaign client list shows a space between the
|
||||
headers if the size of the column is smaller than the header (eg uploads)
|
||||
* make sure a unit with more hitpoints than its maximum doesn't terminate
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
if USESVN
|
||||
SVNREV = $(shell svnversion -n $(topdir) 2>/dev/null)
|
||||
CFLAGS += "-DSVNREV"
|
||||
CXXFLAGS += "-DSVNREV"
|
||||
CFLAGS += "-DSVNREV=\"$(SVNREV)\""
|
||||
CXXFLAGS += "-DSVNREV=\"$(SVNREV)\""
|
||||
endif
|
||||
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
@ -88,7 +88,6 @@ wesnoth_source = \
|
|||
playturn.cpp \
|
||||
publish_campaign.cpp \
|
||||
replay.cpp \
|
||||
revision_stamp.cpp \
|
||||
replay_controller.cpp \
|
||||
sha1.cpp \
|
||||
settings.cpp \
|
||||
|
@ -437,6 +436,7 @@ libwesnoth_a_SOURCES = \
|
|||
sdl_ttf/SDL_ttf.c \
|
||||
wml_exception.cpp
|
||||
|
||||
if USESVN
|
||||
# Until game_config.cpp is removed, this will be needed to ensure that the
|
||||
# SVNVER constant gets updated correctly. If and when that definition is
|
||||
# moved elsewhere, this dependency must follow it.
|
||||
|
@ -444,10 +444,10 @@ game_config.o: revision-stamp
|
|||
|
||||
# Should be touched each time the SVN revision number goes up
|
||||
revision-stamp: FORCE
|
||||
g++ -O2 tools/revision_compiler.cpp -o tools/revision_compiler
|
||||
tools/revision_compiler $(shell svnversion -n $(topdir) 2>/dev/null || unknown) < revision_stamp.tpl > revision_stamp.cpp
|
||||
if [ x"$(SVNREV)" != x`cat revision-stamp 2>/dev/null` ]; then echo -n $(SVNREV) >revision-stamp; fi
|
||||
|
||||
FORCE:
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ -DWESNOTH_PATH=\"$(pkgdatadir)\" \
|
||||
-DLOCALEDIR=\"$(LOCALEDIR)\" -DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) -DFIFODIR=\"$(fifodir)\"\
|
||||
|
|
|
@ -543,9 +543,6 @@ namespace {
|
|||
|
||||
int main(int argc, char**argv)
|
||||
{
|
||||
#ifdef SVNREV
|
||||
game_config::svnrev = get_svn_revision();
|
||||
#endif
|
||||
lg::timestamps(true);
|
||||
try {
|
||||
printf("argc %d argv[0] %s 1 %s\n",argc,argv[0],argv[1]);
|
||||
|
|
|
@ -47,9 +47,6 @@ namespace {
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
#ifdef SVNREV
|
||||
game_config::svnrev = get_svn_revision();
|
||||
#endif
|
||||
const std::string rev = game_config::svnrev.empty() ? "" :
|
||||
" (" + game_config::svnrev + ")";
|
||||
|
||||
|
|
|
@ -2328,9 +2328,6 @@ int main(int argc, char** argv)
|
|||
#endif
|
||||
|
||||
try {
|
||||
#ifdef SVNREV
|
||||
game_config::svnrev = get_svn_revision();
|
||||
#endif
|
||||
const std::string rev = game_config::svnrev.empty() ? "" :
|
||||
" (" + game_config::svnrev + ")";
|
||||
|
||||
|
|
|
@ -40,7 +40,11 @@ namespace game_config
|
|||
const int gold_carryover_percentage = 80;
|
||||
const bool gold_carryover_add = false;
|
||||
const std::string version = VERSION;
|
||||
std::string svnrev = "";
|
||||
#ifdef SVNREV
|
||||
const std::string svnrev = SVNREV;
|
||||
#else
|
||||
const std::string svnrev = "";
|
||||
#endif
|
||||
bool debug = false, editor = false, ignore_replay_errors = false, mp_debug = false, exit_at_end = false, no_delay = false, disable_autosave = false;
|
||||
|
||||
std::string game_icon = "wesnoth-icon.png", game_title, game_logo, title_music;
|
||||
|
|
|
@ -18,7 +18,6 @@ class config;
|
|||
|
||||
#include "color_range.hpp"
|
||||
#include "tstring.hpp"
|
||||
#include "revision_stamp.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -35,7 +34,7 @@ namespace game_config
|
|||
extern int kill_experience;
|
||||
extern unsigned lobby_refresh;
|
||||
extern const std::string version;
|
||||
extern std::string svnrev;
|
||||
extern const std::string svnrev;
|
||||
|
||||
//! Default percentage gold carried over to the next scenario.
|
||||
extern const int gold_carryover_percentage;
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#ifndef REVISON_STAMP_HPP_INCLUDE
|
||||
#define REVISON_STAMP_HPP_INCLUDE
|
||||
#include <string>
|
||||
const std::string& get_svn_revision();
|
||||
#endif
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#include "revision_stamp.hpp"
|
||||
|
||||
const std::string& get_svn_revision()
|
||||
{
|
||||
static const std::string revision = "SVN_REVISION";
|
||||
return revision;
|
||||
}
|
|
@ -1288,9 +1288,6 @@ void server::delete_game(std::vector<game>::iterator game_it) {
|
|||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
#ifdef SVNREV
|
||||
game_config::svnrev = get_svn_revision();
|
||||
#endif
|
||||
int port = 15000;
|
||||
size_t min_threads = 5;
|
||||
size_t max_threads = 0;
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
|
||||
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
or at your option any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY.
|
||||
|
||||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
const int BUFFER_SIZE = 64;
|
||||
const std::string replace = "SVN_REVISION";
|
||||
|
||||
void output(char buf[], int bufi, int matchi)
|
||||
{
|
||||
for (int i = 0;i <= matchi; --matchi)
|
||||
{
|
||||
std::cout << buf[bufi - matchi + i];
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cout << argc;
|
||||
return -1;
|
||||
}
|
||||
std::string replace_with(argv[1]);
|
||||
char * buffer = new char[BUFFER_SIZE];
|
||||
int bufi;
|
||||
int matchi = 0;
|
||||
int read = 0;
|
||||
|
||||
std::cin.read(buffer, BUFFER_SIZE);
|
||||
while( read = std::cin.gcount() )
|
||||
{
|
||||
for(bufi = 0; bufi < read; ++bufi)
|
||||
{
|
||||
if (buffer[bufi] == replace[matchi] )
|
||||
{
|
||||
++matchi;
|
||||
if (matchi == replace.size())
|
||||
{
|
||||
matchi = 0;
|
||||
std::cout << replace_with;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
output(buffer,bufi,matchi);
|
||||
matchi = 0;
|
||||
}
|
||||
}
|
||||
std::cin.read(buffer, BUFFER_SIZE);
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue