Add license headers and remove useless includes

master
Kahrl 2013-09-10 15:49:43 +02:00
parent 3725179736
commit 95e4a93b1b
9 changed files with 178 additions and 82 deletions

View File

@ -1,26 +1,36 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* /*
Dummy "database" class Dummy "database" class
*/ */
#include "database-dummy.h"
#include "map.h" #include "map.h"
#include "mapsector.h" #include "mapsector.h"
#include "mapblock.h" #include "mapblock.h"
#include "serialization.h"
#include "main.h" #include "main.h"
#include "filesys.h"
#include "voxel.h"
#include "porting.h"
#include "mapgen.h"
#include "nodemetadata.h"
#include "settings.h" #include "settings.h"
#include "log.h" #include "log.h"
#include "profiler.h"
#include "nodedef.h"
#include "gamedef.h"
#include "util/directiontables.h"
#include "rollback_interface.h"
#include "database-dummy.h"
Database_Dummy::Database_Dummy(ServerMap *map) Database_Dummy::Database_Dummy(ServerMap *map)
{ {

View File

@ -1,12 +1,30 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_DUMMY_HEADER #ifndef DATABASE_DUMMY_HEADER
#define DATABASE_DUMMY_HEADER #define DATABASE_DUMMY_HEADER
#include "map.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "database.h" #include "database.h"
#include <map>
#include <string>
class ServerMap;
class Database_Dummy : public Database class Database_Dummy : public Database
{ {

View File

@ -1,3 +1,22 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h" #include "config.h"
#if USE_LEVELDB #if USE_LEVELDB
@ -6,25 +25,16 @@ LevelDB databases
*/ */
#include "database-leveldb.h"
#include "leveldb/db.h"
#include "map.h" #include "map.h"
#include "mapsector.h" #include "mapsector.h"
#include "mapblock.h" #include "mapblock.h"
#include "serialization.h"
#include "main.h" #include "main.h"
#include "filesys.h"
#include "voxel.h"
#include "porting.h"
#include "mapgen.h"
#include "nodemetadata.h"
#include "settings.h" #include "settings.h"
#include "log.h" #include "log.h"
#include "profiler.h"
#include "nodedef.h"
#include "gamedef.h"
#include "util/directiontables.h"
#include "rollback_interface.h"
#include "database-leveldb.h"
#include "leveldb/db.h"
Database_LevelDB::Database_LevelDB(ServerMap *map, std::string savedir) Database_LevelDB::Database_LevelDB(ServerMap *map, std::string savedir)
{ {

View File

@ -1,17 +1,34 @@
#include "config.h" /*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#if USE_LEVELDB
#ifndef DATABASE_LEVELDB_HEADER #ifndef DATABASE_LEVELDB_HEADER
#define DATABASE_LEVELDB_HEADER #define DATABASE_LEVELDB_HEADER
#include "map.h" #include "config.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "database.h"
#if USE_LEVELDB
#include "database.h"
#include "leveldb/db.h" #include "leveldb/db.h"
#include <string>
class ServerMap;
class Database_LevelDB : public Database class Database_LevelDB : public Database
{ {

View File

@ -1,3 +1,22 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/* /*
SQLite format specification: SQLite format specification:
- Initially only replaces sectors/ and sectors2/ - Initially only replaces sectors/ and sectors2/
@ -15,24 +34,16 @@
BLOB data BLOB data
*/ */
#include "database-sqlite3.h"
#include "map.h" #include "map.h"
#include "mapsector.h" #include "mapsector.h"
#include "mapblock.h" #include "mapblock.h"
#include "serialization.h"
#include "main.h" #include "main.h"
#include "filesys.h"
#include "voxel.h"
#include "porting.h"
#include "mapgen.h"
#include "nodemetadata.h"
#include "settings.h" #include "settings.h"
#include "log.h" #include "log.h"
#include "profiler.h"
#include "nodedef.h"
#include "gamedef.h"
#include "util/directiontables.h"
#include "rollback_interface.h"
#include "database-sqlite3.h"
Database_SQLite3::Database_SQLite3(ServerMap *map, std::string savedir) Database_SQLite3::Database_SQLite3(ServerMap *map, std::string savedir)
{ {

View File

@ -1,18 +1,34 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_SQLITE3_HEADER #ifndef DATABASE_SQLITE3_HEADER
#define DATABASE_SQLITE3_HEADER #define DATABASE_SQLITE3_HEADER
#include "config.h"
#include "map.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "database.h" #include "database.h"
#include <string>
extern "C" { extern "C" {
#include "sqlite3.h" #include "sqlite3.h"
} }
class ServerMap;
class Database_SQLite3 : public Database class Database_SQLite3 : public Database
{ {
public: public:

View File

@ -1,22 +1,24 @@
#include "map.h" /*
#include "mapsector.h" Minetest
#include "mapblock.h" Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
#include "main.h"
#include "filesys.h"
#include "voxel.h"
#include "porting.h"
#include "mapgen.h"
#include "nodemetadata.h"
#include "settings.h"
#include "log.h"
#include "profiler.h"
#include "nodedef.h"
#include "gamedef.h"
#include "util/directiontables.h"
#include "rollback_interface.h"
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "database.h" #include "database.h"
#include "irrlichttypes.h"
static s32 unsignedToSigned(s32 i, s32 max_positive) static s32 unsignedToSigned(s32 i, s32 max_positive)
{ {

View File

@ -1,17 +1,29 @@
/*
Minetest
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef DATABASE_HEADER #ifndef DATABASE_HEADER
#define DATABASE_HEADER #define DATABASE_HEADER
#include "config.h"
#include "map.h"
#include "mapsector.h"
#include "mapblock.h"
#include "main.h"
#include "filesys.h"
#include "serialization.h"
#include <list> #include <list>
#include "irr_v3d.h"
class Database; class MapBlock;
class ServerMap;
class Database class Database
{ {

View File

@ -33,8 +33,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "modifiedstate.h" #include "modifiedstate.h"
#include "util/container.h" #include "util/container.h"
#include "nodetimer.h" #include "nodetimer.h"
#include "database.h"
class Database;
class ClientMap; class ClientMap;
class MapSector; class MapSector;
class ServerMapSector; class ServerMapSector;