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.
The new type C4TimeMilliseconds behaves for the most part like a uint32_t but is overflow-proof in comparisons.
In some places, a 0-value (or uint_max) of the variable storing the time had the special meaning "not set yet". This has been resolved by having it as a pointer to C4TimeMilliseconds with NULL meaning that it has not been set yet.
The network used to cast GetTime() to int, but GetTime() is an unsigned long. This might cause problems if GetTime() returns big integers (see #251). To solve this, the StdSchedulerProc interface had to be extended with another function in order to eliminate the magic return value -1 of GetNextTick for "no scheduled execution".
Given that SimpleUDP makes no promises on delivering data anyway, it's okay
to just drop packets silently.
While I'm at it, it's probably a good idea for non-Windows system to
set sockets as non-blocking too, as well as C4NetIOUDP to be more
consistent with its handling of errors along these lines.
OR'ing an enum value and a char with its highest bit set sign-extends the char.
On compilers with signed chars, this means you end up with a negative integer,
which can't be narrowed to uint8_t at initialization (which is what PacketHdr's
first member is).
rand() returns a signed integer, while the PacketHdr structure
has an unsigned packet number field. According to ISO/IEC 14882,
implicitly narrowing a value type in an initializer list is not
allowed [dcl.init.aggr p2].
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
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.
Most files using it weren't used by c4group-the-application anymore, and
the remaining stuff can be dealt with by using stubs or the same code in
both cases.
The non-winsock part of the code was making some funny assumptions about
the the connection/peer lists staying consistent with the pollfd array,
so we use a pollfd map instead.
---
src/network/C4NetIO.cpp | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
In the not-STDSCHEDULER_USE_EVENTS case, the fds pointer will point to
the elements of a vector with automatic storage duration and then
outlive its lifetime, causing undefined behaviour.
---
src/network/C4NetIO.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)