summaryrefslogtreecommitdiff
path: root/src/compat
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/alg.cpp18
-rw-r--r--src/compat/alg.hpp18
-rw-r--r--src/compat/attr.hpp18
-rw-r--r--src/compat/cast.cpp18
-rw-r--r--src/compat/cast.hpp18
-rw-r--r--src/compat/fun.hpp20
-rw-r--r--src/compat/iter.cpp18
-rw-r--r--src/compat/iter_test.cpp22
-rw-r--r--src/compat/memory.cpp18
-rw-r--r--src/compat/memory.hpp18
-rw-r--r--src/compat/nullpo.cpp20
-rw-r--r--src/compat/nullpo.hpp22
-rw-r--r--src/compat/rawmem.cpp18
-rw-r--r--src/compat/rawmem.hpp21
14 files changed, 265 insertions, 2 deletions
diff --git a/src/compat/alg.cpp b/src/compat/alg.cpp
index 7800e79..8cfd00a 100644
--- a/src/compat/alg.cpp
+++ b/src/compat/alg.cpp
@@ -1,3 +1,21 @@
#include "alg.hpp"
+// alg.cpp - Silly math stuff.
+//
+// Copyright © 2012 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
diff --git a/src/compat/alg.hpp b/src/compat/alg.hpp
index 250c161..adf3f3f 100644
--- a/src/compat/alg.hpp
+++ b/src/compat/alg.hpp
@@ -1,5 +1,23 @@
#ifndef TMWA_COMPAT_ALG_HPP
#define TMWA_COMPAT_ALG_HPP
+// alg.hpp - Silly math stuff.
+//
+// Copyright © 2012 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include "../sanity.hpp"
diff --git a/src/compat/attr.hpp b/src/compat/attr.hpp
index ca9a7a2..ea7ba86 100644
--- a/src/compat/attr.hpp
+++ b/src/compat/attr.hpp
@@ -1,5 +1,23 @@
#ifndef TMWA_COMPAT_ATTR_HPP
#define TMWA_COMPAT_ATTR_HPP
+// attr.hpp - Attributes.
+//
+// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include "../sanity.hpp"
diff --git a/src/compat/cast.cpp b/src/compat/cast.cpp
index 015fd27..43c0b53 100644
--- a/src/compat/cast.cpp
+++ b/src/compat/cast.cpp
@@ -1,3 +1,21 @@
#include "cast.hpp"
+// cast.cpp - Change the type of a variable.
+//
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
diff --git a/src/compat/cast.hpp b/src/compat/cast.hpp
index c1b9bab..8db486f 100644
--- a/src/compat/cast.hpp
+++ b/src/compat/cast.hpp
@@ -1,5 +1,23 @@
#ifndef TMWA_COMPAT_CAST_HPP
#define TMWA_COMPAT_CAST_HPP
+// cast.hpp - Change the type of a variable.
+//
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include "../sanity.hpp"
diff --git a/src/compat/fun.hpp b/src/compat/fun.hpp
index 536a113..005f2c5 100644
--- a/src/compat/fun.hpp
+++ b/src/compat/fun.hpp
@@ -1,10 +1,30 @@
#ifndef TMWA_COMPAT_FUN_HPP
#define TMWA_COMPAT_FUN_HPP
+// fun.hpp - Functional placeholders.
+//
+// Copyright © 2013 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include "../sanity.hpp"
# include <functional>
+# include "../sanity.hpp"
+
namespace ph = std::placeholders;
diff --git a/src/compat/iter.cpp b/src/compat/iter.cpp
index 2b1fb0c..f0ab0af 100644
--- a/src/compat/iter.cpp
+++ b/src/compat/iter.cpp
@@ -1,3 +1,21 @@
#include "iter.hpp"
+// iter.cpp - tools for dealing with iterators
+//
+// Copyright © 2012-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
diff --git a/src/compat/iter_test.cpp b/src/compat/iter_test.cpp
index 647ebf9..a07cb0f 100644
--- a/src/compat/iter_test.cpp
+++ b/src/compat/iter_test.cpp
@@ -1,10 +1,30 @@
#include "iter.hpp"
+// iter_test.cpp - Testsuite for tools for dealing with iterators
+//
+// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include <gtest/gtest.h>
#include "../strings/xstring.hpp"
-TEST(iterpair, string)
+#include "../poison.hpp"
+
+TEST(iterpair, strings)
{
IteratorPair<ValueIterator<char>> pair = value_range('0', ':');
const char *str = "0123456789";
diff --git a/src/compat/memory.cpp b/src/compat/memory.cpp
index 6a5f526..5db23b2 100644
--- a/src/compat/memory.cpp
+++ b/src/compat/memory.cpp
@@ -1,3 +1,21 @@
#include "memory.hpp"
+// memory.cpp - I forget ...
+//
+// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
diff --git a/src/compat/memory.hpp b/src/compat/memory.hpp
index 2839640..2c0f742 100644
--- a/src/compat/memory.hpp
+++ b/src/compat/memory.hpp
@@ -1,5 +1,23 @@
#ifndef TMWA_COMPAT_MEMORY_HPP
#define TMWA_COMPAT_MEMORY_HPP
+// memory.hpp - I forget ...
+//
+// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include "../sanity.hpp"
diff --git a/src/compat/nullpo.cpp b/src/compat/nullpo.cpp
index 423ed8c..a31cc34 100644
--- a/src/compat/nullpo.cpp
+++ b/src/compat/nullpo.cpp
@@ -1,4 +1,24 @@
#include "nullpo.hpp"
+// nullpo.cpp - Non-fatal pointer assertions.
+//
+// Copyright © ????-2004 Athena Dev Teams
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include <cstdio>
diff --git a/src/compat/nullpo.hpp b/src/compat/nullpo.hpp
index 6eca4b6..75f8110 100644
--- a/src/compat/nullpo.hpp
+++ b/src/compat/nullpo.hpp
@@ -1,6 +1,26 @@
-/// return wrappers for unexpected NULL pointers
#ifndef TMWA_COMPAT_NULLPO_HPP
#define TMWA_COMPAT_NULLPO_HPP
+// nullpo.hpp - Non-fatal pointer assertions.
+//
+// Copyright © ????-2004 Athena Dev Teams
+// Copyright © 2004-2011 The Mana World Development Team
+// Copyright © 2011-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
+
/// Uncomment this to live dangerously
/// (really exist to detect mostly-unused variables)
//# define BUG_FREE
diff --git a/src/compat/rawmem.cpp b/src/compat/rawmem.cpp
index 9e353e8..74fdc0b 100644
--- a/src/compat/rawmem.cpp
+++ b/src/compat/rawmem.cpp
@@ -1,3 +1,21 @@
#include "rawmem.hpp"
+// rawmem.cpp - Ignore poisoning and really frob this memory unsafely.
+//
+// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
#include "../poison.hpp"
diff --git a/src/compat/rawmem.hpp b/src/compat/rawmem.hpp
index ac08964..bbe917c 100644
--- a/src/compat/rawmem.hpp
+++ b/src/compat/rawmem.hpp
@@ -1,10 +1,30 @@
#ifndef TMWA_COMPAT_RAWMEM_HPP
#define TMWA_COMPAT_RAWMEM_HPP
+// rawmem.hpp - Ignore poisoning and really frob this memory unsafely.
+//
+// Copyright © 2013-2014 Ben Longbons <b.r.longbons@gmail.com>
+//
+// This file is part of The Mana World (Athena server)
+//
+// 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// 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, see <http://www.gnu.org/licenses/>.
# include <cstddef>
# include <cstdint>
# include <cstring>
+# include "../sanity.hpp"
+
inline
void really_memcpy(uint8_t *dest, const uint8_t *src, size_t n)
{
@@ -27,4 +47,5 @@ void really_memset0(uint8_t *dest, size_t n)
{
memset(dest, '\0', n);
}
+
#endif // TMWA_COMPAT_RAWMEM_HPP