forked from github/server
Remove a German-only piece of text, to reduce the footprint of fleets in the report a little.
Fix English score message in NR. Small fixes to meet Visual Studio warning level 4.
This commit is contained in:
parent
e87b1cf372
commit
2211111b29
|
@ -854,7 +854,7 @@
|
|||
<arg name="average" type="int"/>
|
||||
</type>
|
||||
<text locale="de">"Deine Partei hat $int($score) Punkte. Der Durchschnitt für Parteien ähnlichen Alters ist $int($average) Punkte."</text>
|
||||
<text locale="fr">"Your faction has a score of $int($score). The average score for similar factions is $int($average)."</text>
|
||||
<text locale="en">"Your faction has a score of $int($score). The average score for similar factions is $int($average)."</text>
|
||||
</message>
|
||||
<message name="nr_header_date" section="nr">
|
||||
<type>
|
||||
|
@ -862,7 +862,6 @@
|
|||
<arg name="date" type="string"/>
|
||||
</type>
|
||||
<text locale="de">"Report für $game, $date"</text>
|
||||
<text locale="fr">"Report for $game, $date"</text>
|
||||
<text locale="en">"Report for $game, $date"</text>
|
||||
</message>
|
||||
<message name="nr_vicinitystart" section="nr">
|
||||
|
|
|
@ -1417,6 +1417,7 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
|
|||
if (cansee_durchgezogen(f, r, u, 0)) {
|
||||
++counter;
|
||||
if (u->ship != NULL) {
|
||||
#ifdef GERMAN_FLUFF_DISABLED
|
||||
if (counter == 1) {
|
||||
bytes = (int)strlcpy(bufp, "Die ", size);
|
||||
}
|
||||
|
@ -1427,6 +1428,7 @@ static void durchreisende(FILE * F, const region * r, const faction * f)
|
|||
WARN_STATIC_BUFFER();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
bytes = (int)strlcpy(bufp, shipname(u->ship), size);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <util/log.h>
|
||||
|
||||
|
||||
#pragma warning(disable: 4210)
|
||||
#define ADD_TESTS(suite, name) \
|
||||
CuSuite *get_##name##_suite(void); \
|
||||
CuSuiteAddSuite(suite, get_##name##_suite())
|
||||
|
|
|
@ -6,7 +6,7 @@ static void test_strlcat(CuTest * tc)
|
|||
{
|
||||
char buffer[32];
|
||||
|
||||
memset(buffer, 0xfe, sizeof(buffer));
|
||||
memset(buffer, 0x7f, sizeof(buffer));
|
||||
|
||||
buffer[0] = '\0';
|
||||
CuAssertIntEquals(tc, 4, strlcat(buffer, "herp", 4));
|
||||
|
@ -15,29 +15,29 @@ static void test_strlcat(CuTest * tc)
|
|||
buffer[0] = '\0';
|
||||
CuAssertIntEquals(tc, 4, strlcat(buffer, "herp", 8));
|
||||
CuAssertStrEquals(tc, "herp", buffer);
|
||||
CuAssertIntEquals(tc, (char)0xfe, buffer[5]);
|
||||
CuAssertIntEquals(tc, 0x7f, buffer[5]);
|
||||
|
||||
CuAssertIntEquals(tc, 8, strlcat(buffer, "derp", 8));
|
||||
CuAssertStrEquals(tc, "herpder", buffer);
|
||||
CuAssertIntEquals(tc, (char)0xfe, buffer[8]);
|
||||
CuAssertIntEquals(tc, 0x7f, buffer[8]);
|
||||
}
|
||||
|
||||
static void test_strlcpy(CuTest * tc)
|
||||
{
|
||||
char buffer[32];
|
||||
|
||||
memset(buffer, 0xed, sizeof(buffer));
|
||||
memset(buffer, 0x7f, sizeof(buffer));
|
||||
|
||||
CuAssertIntEquals(tc, 4, strlcpy(buffer, "herp", 4));
|
||||
CuAssertStrEquals(tc, "her", buffer);
|
||||
|
||||
CuAssertIntEquals(tc, 4, strlcpy(buffer, "herp", 8));
|
||||
CuAssertStrEquals(tc, "herp", buffer);
|
||||
CuAssertIntEquals(tc, (char)0xed, buffer[5]);
|
||||
CuAssertIntEquals(tc, 0x7f, buffer[5]);
|
||||
|
||||
CuAssertIntEquals(tc, 8, strlcpy(buffer, "herpderp", 8));
|
||||
CuAssertStrEquals(tc, "herpder", buffer);
|
||||
CuAssertIntEquals(tc, (char)0xed, buffer[8]);
|
||||
CuAssertIntEquals(tc, 0x7f, buffer[8]);
|
||||
}
|
||||
|
||||
static void test_slprintf(CuTest * tc)
|
||||
|
|
Loading…
Reference in New Issue