ap = dam / 100.0;
osupport += ap;
}
- sprintf(outs, "attacker\t%1.2f\t%1.2f\t%1.2f\t%1.2f\n", af, as, au,
- ap);
+ sprintf(outs, "attacker\t%1.2f\t%1.2f\t%1.2f\t%1.2f", af, as, au, ap);
return osupport;
}
if (good)
*outs = '\0';
else
- sprintf(outs, "defender\t%1.2f\t%1.2f\t%1.2f\t%1.2f\n", df, ds,
- du, dp);
+ sprintf(outs, "defender\t%1.2f\t%1.2f\t%1.2f\t%1.2f",
+ df, ds, du, dp);
if (def->own) {
if (good < 0)
wu(0, def->own,
pr("\n\t\tsupport values\n");
pr("\t\tforts\tships\tunits\tplanes\n");
if (*osupportp != 1.0)
- pr("%s", osupports);
+ pr("%s\n", osupports);
if (*dsupportp != 1.0)
- pr("%s", dsupports);
+ pr("%s\n", dsupports);
pr("\n");
if (def->own) {
wu(0, def->own, "\n\t\tsupport values\n");
wu(0, def->own, "\t\tforts\tships\tunits\tplanes\n");
if (*osupportp != 1.0)
- wu(0, def->own, "%s", osupports);
+ wu(0, def->own, "%s\n", osupports);
if (*dsupportp != 1.0)
- wu(0, def->own, "%s", dsupports);
+ wu(0, def->own, "%s\n", dsupports);
wu(0, def->own, "\n");
}
}
int t;
t = lp->lnd_tech - 20 + roll(40);
t = MAX(t, 0);
- sprintf(buf3, ", tech %d)\n", t);
+ sprintf(buf3, ", tech %d)", t);
} else {
- sprintf(buf3, ")\n");
+ sprintf(buf3, ")");
}
} else {
- sprintf(buf2, "\n");
- buf3[0] = 0;
+ buf2[0] = buf3[0] = 0;
}
if (destination == player->cnum)
pr("%s%s%s", buf1, buf2, buf3);
else
- wu(0, destination, "%s%s%s", buf1, buf2, buf3);
+ wu(0, destination, "%s%s%s\n", buf1, buf2, buf3);
}
}