X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Faddon%2Faddon.cpp;h=c4bc5adcbc4a99ab64cacb91aa5122e450d7bc8f;hb=53026cfb1c6cd664a6bf9f9d3d05789b00b43df5;hp=4e8c9f6f61c746359a0fc3144a2c859031f9cbb0;hpb=c686b6e6bc389edb08cef2215b0882b2b0ff4b4b;p=supertux.git diff --git a/src/addon/addon.cpp b/src/addon/addon.cpp index 4e8c9f6f6..c4bc5adcb 100644 --- a/src/addon/addon.cpp +++ b/src/addon/addon.cpp @@ -1,12 +1,10 @@ -// $Id$ -// // SuperTux - Add-on // Copyright (C) 2007 Christoph Sommer // -// 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 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. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -14,19 +12,19 @@ // 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. -// +// along with this program. If not, see . -#include -#include -#include -#include #include "addon/addon.hpp" -#include "addon/addon_manager.hpp" -#include "log.hpp" + +#include +#include +#include + #include "addon/md5.hpp" +#include "lisp/parser.hpp" +#include "util/reader.hpp" +#include "util/writer.hpp" +#include "util/log.hpp" std::string Addon::get_md5() const @@ -62,7 +60,7 @@ Addon::get_md5() const } void -Addon::parse(const lisp::Lisp& lisp) +Addon::parse(const Reader& lisp) { try { lisp.get("kind", kind); @@ -99,13 +97,13 @@ void Addon::write(lisp::Writer& writer) const { writer.start_list("supertux-addoninfo"); - if (kind != "") writer.write_string("kind", kind); - if (title != "") writer.write_string("title", title); - if (author != "") writer.write_string("author", author); - if (license != "") writer.write_string("license", license); - if (http_url != "") writer.write_string("http-url", http_url); - if (suggested_filename != "") writer.write_string("file", suggested_filename); - if (stored_md5 != "") writer.write_string("md5", stored_md5); + if (kind != "") writer.write("kind", kind); + if (title != "") writer.write("title", title); + if (author != "") writer.write("author", author); + if (license != "") writer.write("license", license); + if (http_url != "") writer.write("http-url", http_url); + if (suggested_filename != "") writer.write("file", suggested_filename); + if (stored_md5 != "") writer.write("md5", stored_md5); writer.end_list("supertux-addoninfo"); } @@ -130,3 +128,4 @@ Addon::operator==(Addon addon2) const return true; } +/* EOF */