Commit Graph

30 Commits (eabca223f5e7c237f5d3bb88183d38a41cb9bced)

Author SHA1 Message Date
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Nicolas Hake 24b54211c5 Drop Min, Max, Swap for std::min, std::max, std::swap
The C++ standard library comes with perfectly fine implementations of
these functions, so there's no point in reimplementing them just for the
hell of it.
2015-11-15 13:53:01 +01:00
Peter Wortmann f0030e33e0 Warning fixes
Actually pretty sure a few of them were bugs. Hopefully no new
ones were introduced here.
2015-10-03 15:32:39 +01:00
Sven Eberhardt 283277ac82 Do not pre-load file contents from unpacked music folders ($1378).
Removes several seconds from startup time and ~150MB memory usage. Note that tags are still loaded so all file headers do have to be accessed.
2015-09-06 00:02:17 -04:00
Sven Eberhardt 90cca08d63 Add /todo message board command.
Adds text to local TODO.txt file. Useful for taking notes quickly e.g. when testing new scenarios in a network game.

TODO filenames are configurable. Default file is TODO.txt in the scenario file (if it's unpacked) and TODO.txt on the current path if access to the first location failed.
2015-03-05 16:04:07 +01:00
Günther Brammer 5bcedb5bbf Remove some redundant #includes 2015-01-25 18:53:48 +01:00
Armin Burgmeier dd16b2d588 Set useful name for in-memory CStdFiles
This fixes a valgrind warning when creating a savegame, since in that case
the file name is filled with uninitialized junk. It is not used at other
places, since it is an in-memory file, and therefore was probably harmless.

Now we give a useful name to in-memory files based on the address of the
StdBuf object, which might actually be useful when debugging.
2014-12-06 15:42:42 -05:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt 3019a8e66e Fix file SHA1 calculation.
sha1::digest_type is a reference, so cast the BYTE and not the pointer. SHA1 calculation of file contents is required for league.
2013-09-26 23:52:23 +02:00
Günther Brammer 864c5c7ea8 copyright notices update 2012 2013-01-12 16:31:40 +01:00
Günther Brammer b4fd8fcd15 linux: Add O_CLOEXEC to various open calls
This should prevent some file descriptor leakage from forks that
some libraries we use do.
2012-03-05 01:33:02 +01:00
Armin Burgmeier 2092baaa18 Fix possible double close when attempting to open uncompressed files 2012-02-05 20:00:47 +01:00
Armin Burgmeier 8e5b9262df Fix a possible file leak in CStdFile::Open
This happened if open() worked but c4_gzdopen failed. This bug prevented
Objects.ocd being packed because of "Too many files open."
2012-02-04 21:28:17 +01:00
Armin Burgmeier a1370c2954 Rename our custom gz* functions to avoid conflicts with zlib.dll
This fixes the build with native mingw for me.
2012-01-28 17:02:37 +01:00
Günther Brammer b911630578 Replace OpenSSL SHA1 implementation with one copied from boost/uuid
Although the code already uses boost, boost/uuid hides the sha1
implementation in a deeply nested namespace, which is just too bizarre to
use. Also the name of that namespace suggests that it is just an
implementation detail that could go away without notice.
2011-01-10 21:30:40 +01:00
Sven Eberhardt 452f34ffd9 Debug: Add thread checking for CStdFile 2011-10-09 20:11:18 +02:00
Günther Brammer dfc799aa27 Rename C4Group_GetFileCRC/SHA1 to GetFileCRC/SHA1
These functions aren't used for files in groups and
consequently broken for them. Remove the dead code.
2011-09-15 20:16:00 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Nicolas Hake 0f4e6e8ccd win32: Use wide variants of CRT file access APIs 2011-08-11 15:46:06 +02:00
Günther Brammer 3c557d34a4 win32: Use open+gzdopen instead of gzopen
In preparation for a utf-8 wrapper around open.
2011-06-19 17:38:27 +02:00
Günther Brammer 505b616404 Remove obsolete CStdFile::Load/Save 2011-06-19 16:35:06 +02:00
Nicolas Hake 5dc0d3b4cb Reduce value truncation warnings 2010-04-20 18:20:24 +02:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Günther Brammer e30ff99d6a Remove all superflous #include <Standard.h>
Standard.h is included by C4Include.h, and every file includes that.
2010-03-04 22:11:12 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
Nicolas Hake f0fdf5e992 Prepare for precompiled headers 2009-10-20 05:39:24 +02:00
Günther Brammer 9a8b5dd739 Replace BOOL by bool, TRUE by true, FALSE by false 2009-08-15 20:50:32 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00