fixed formatting errors

This commit is contained in:
Steffen Mecke 2015-01-30 20:43:40 +01:00
parent 039ee159cb
commit 5e4ea5a145
1 changed files with 85 additions and 80 deletions

View File

@ -654,7 +654,8 @@ int indent)
else if (a->type == &at_effect && self) {
effect_data *data = (effect_data *)a->data.v;
if (data->value > 0) {
msg = msg_message("nr_potion_effect", "potion left", data->type->itype->rtype, data->value);
msg = msg_message("nr_potion_effect", "potion left",
data->type->itype->rtype, data->value);
nr_render(msg, viewer->locale, buf, sizeof(buf), viewer);
rparagraph(F, buf, indent, 2, 0);
msg_release(msg);
@ -823,7 +824,7 @@ static void prices(FILE * F, const region * r, const faction * f)
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
for (dmd = r->land->demands; dmd; dmd = dmd->next)
for (dmd = r->land->demands; dmd; dmd = dmd->next){
if (dmd->value > 0) {
m = msg_message("nr_market_price", "product price",
dmd->type->itype->rtype, dmd->value * dmd->type->price);
@ -833,28 +834,30 @@ static void prices(FILE * F, const region * r, const faction * f)
msg_release(m);
n--;
if (n == 0) {
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_end"), size);
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_end"),
size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
}
else if (n == 1) {
} else if (n == 1) {
bytes = (int)strlcpy(bufp, " ", size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_final"), size);
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_final"),
size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, " ", size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
} else {
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_next"),
size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, " ", size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
}
else {
bytes = (int)strlcpy(bufp, LOC(f->locale, "nr_trade_next"), size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
bytes = (int)strlcpy(bufp, " ", size);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();
}
}
}
@ -1272,7 +1275,8 @@ static void describe(FILE * F, const seen_region * sr, faction * f)
first = false;
}
// TODO name is localized? Works for roads anyway...
msg = msg_message("nr_borderlist_postfix", "transparent object", e->transparent, e->name);
msg = msg_message("nr_borderlist_postfix", "transparent object",
e->transparent, e->name);
bytes = (int)nr_render(msg, f->locale, bufp, size, f);
msg_release(msg);
if (wrptr(&bufp, &size, bytes) != 0)
@ -2019,7 +2023,8 @@ const faction * f)
}
if (b->besieged > 0 && sr->mode >= see_lighthouse) {
msg = msg_message("nr_building_besieged", "soldiers diff", b->besieged, b->besieged - b->size * SIEGEFACTOR);
msg = msg_message("nr_building_besieged", "soldiers diff", b->besieged,
b->besieged - b->size * SIEGEFACTOR);
bytes = (int)nr_render(msg, f->locale, bufp, size, f);
if (wrptr(&bufp, &size, bytes) != 0)
WARN_STATIC_BUFFER();