wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src actions.cpp config.cpp game.cpp edi...


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src actions.cpp config.cpp game.cpp edi...
Date: Thu, 25 Nov 2004 14:56:46 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/11/25 19:50:51

Modified files:
        src            : actions.cpp config.cpp game.cpp 
        src/editor     : scenario_editor.cpp 
        src/server     : input_stream.cpp 

Log message:
        dos2unix

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.167&tr2=1.168&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/config.cpp.diff?tr1=1.114&tr2=1.115&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.166&tr2=1.167&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/editor/scenario_editor.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/input_stream.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.167 wesnoth/src/actions.cpp:1.168
--- wesnoth/src/actions.cpp:1.167       Tue Nov 23 00:35:20 2004
+++ wesnoth/src/actions.cpp     Thu Nov 25 19:50:51 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.167 2004/11/23 00:35:20 Sirp Exp $ */
+/* $Id: actions.cpp,v 1.168 2004/11/25 19:50:51 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -574,9 +574,9 @@
 
        std::map<gamemap::location,unit>::iterator a = units.find(attacker);
        std::map<gamemap::location,unit>::iterator d = units.find(defender);
-
-       if(a == units.end() || d == units.end()) {
-               return;
+
+       if(a == units.end() || d == units.end()) {
+               return;
        }
 
        int attackerxp = d->second.type().level();
Index: wesnoth/src/config.cpp
diff -u wesnoth/src/config.cpp:1.114 wesnoth/src/config.cpp:1.115
--- wesnoth/src/config.cpp:1.114        Thu Nov 25 00:20:53 2004
+++ wesnoth/src/config.cpp      Thu Nov 25 19:50:51 2004
@@ -1,4 +1,4 @@
-/* $Id: config.cpp,v 1.114 2004/11/25 00:20:53 Sirp Exp $ */
+/* $Id: config.cpp,v 1.115 2004/11/25 19:50:51 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -566,8 +566,8 @@
 
        enum { ELEMENT_NAME, IN_ELEMENT, VARIABLE_NAME, VALUE }
        state = IN_ELEMENT;
-       std::string var;
-
+       std::string var;
+
        std::vector<std::pair<std::string,bool> > stored_values;
        std::string value;
 
@@ -724,7 +724,7 @@
                                if(in_quotes && c == '"' && (i+1) != data.end() 
&& *(i+1) == '"') {
                                        push_back(value, c);
                                        ++i; // skip the next double-quote
-                               } else if(c == '"') {
+                               } else if(c == '"') {
                                        expecting_value = false;
                                        in_quotes = !in_quotes;
                                        has_quotes = true;
@@ -738,25 +738,25 @@
                                                        translatable = true;
                                                }
                                        }
-                               } else if(c == '+' && has_quotes && !in_quotes) 
{
-                                       
stored_values.push_back(std::make_pair(value,translatable));
-                                       value = "";
-                                       translatable = false;
-                                       expecting_value = true;
-                               } else if(c == '\n' && !in_quotes && 
expecting_value) {
-                                       //do nothing...just ignore
-                               } else if(c == '\n' && !in_quotes) {
-
-                                       
stored_values.push_back(std::make_pair(value,translatable));
-                                       value = "";
-                                       
for(std::vector<std::pair<std::string,bool> >::const_iterator i = 
stored_values.begin(); i != stored_values.end(); ++i) {
-                                               if(i->second) {
-                                                       value += 
dsgettext(current_textdomain.c_str(),i->first.c_str());
-                                               } else {
-                                                       value += i->first;
-                                               }
-                                       }
-
+                               } else if(c == '+' && has_quotes && !in_quotes) 
{
+                                       
stored_values.push_back(std::make_pair(value,translatable));
+                                       value = "";
+                                       translatable = false;
+                                       expecting_value = true;
+                               } else if(c == '\n' && !in_quotes && 
expecting_value) {
+                                       //do nothing...just ignore
+                               } else if(c == '\n' && !in_quotes) {
+
+                                       
stored_values.push_back(std::make_pair(value,translatable));
+                                       value = "";
+                                       
for(std::vector<std::pair<std::string,bool> >::const_iterator i = 
stored_values.begin(); i != stored_values.end(); ++i) {
+                                               if(i->second) {
+                                                       value += 
dsgettext(current_textdomain.c_str(),i->first.c_str());
+                                               } else {
+                                                       value += i->first;
+                                               }
+                                       }
+
                                        stored_values.clear();
 
                                        //see if this is a CSV list=CSV list 
style assignment (e.g. x,y=5,8)
@@ -812,7 +812,7 @@
                                        has_quotes = false;
                                        escape_next = false;
                                        translatable = false;
-                               } else if(in_quotes || !has_quotes) {
+                               } else if(in_quotes || !has_quotes) {
                                        expecting_value = false;
                                        push_back(value, c);
                                }
Index: wesnoth/src/editor/scenario_editor.cpp
diff -u wesnoth/src/editor/scenario_editor.cpp:1.3 
wesnoth/src/editor/scenario_editor.cpp:1.4
--- wesnoth/src/editor/scenario_editor.cpp:1.3  Thu Nov 18 04:08:33 2004
+++ wesnoth/src/editor/scenario_editor.cpp      Thu Nov 25 19:50:51 2004
@@ -1,5 +1,5 @@
-#include "../global.hpp"
-
+#include "../global.hpp"
+
 #include "scenario_editor.hpp"
 
 scenario_editor::scenario_editor(game_data& gameinfo, const config& 
game_config, CVideo& video)
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.166 wesnoth/src/game.cpp:1.167
--- wesnoth/src/game.cpp:1.166  Tue Nov 23 23:27:49 2004
+++ wesnoth/src/game.cpp        Thu Nov 25 19:50:51 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.166 2004/11/23 23:27:49 Sirp Exp $ */
+/* $Id: game.cpp,v 1.167 2004/11/25 19:50:51 ydirson Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -561,7 +561,7 @@
 }
 
 bool game_controller::init_config()
-{
+{
        units_data_.clear();
        defines_map_.clear();
 
@@ -591,7 +591,7 @@
 
        hotkey::load_hotkeys(game_config_);
 
-       paths_manager_.set_paths(game_config_);
+       paths_manager_.set_paths(game_config_);
 
        const config* const units = game_config_.child("units");
        if(units != NULL) {
Index: wesnoth/src/server/input_stream.cpp
diff -u wesnoth/src/server/input_stream.cpp:1.2 
wesnoth/src/server/input_stream.cpp:1.3
--- wesnoth/src/server/input_stream.cpp:1.2     Thu Nov 18 04:08:33 2004
+++ wesnoth/src/server/input_stream.cpp Thu Nov 25 19:50:51 2004
@@ -1,18 +1,18 @@
 #include "input_stream.hpp"
-
-#ifndef _WIN32
+
+#ifndef _WIN32
 
 #include <algorithm>
 #include <iostream>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
-
+#include <unistd.h>
+
 #endif
 
 input_stream::input_stream(const std::string& path) : fd_(-1), path_(path)
-{
+{
 #ifndef _WIN32
        if(path == "") {
                return;
@@ -29,22 +29,22 @@
                std::cerr << "failed to open fifo at '" << path << "'\n";
        } else {
                std::cerr << "opened fifo at '" << path << "'. Server commands 
may be written to this file.\n";
-       }
+       }
 #endif
 }
 
 input_stream::~input_stream()
-{
+{
 #ifndef _WIN32
        if(fd_ != -1) {
                close(fd_);
                unlink(path_.c_str());
-       }
+       }
 #endif
 }
 
 bool input_stream::read_line(std::string& str)
-{
+{
 #ifndef _WIN32
        if(fd_ == -1) {
                return false;
@@ -64,8 +64,8 @@
                return true;
        } else {
                return false;
-       }
-#else
-       return false;
+       }
+#else
+       return false;
 #endif
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]