(bzero, bcopy): Obsolete BSDisms; remove. Remove some calls without

effect.  Replace calls by struct assignment where possible.  Replace
clear buffer, copy string to buffer by strncpy().  Use assignment to
clear when that's clearer.  Replace overlapping copy through bounce
buffer by memmove().  Replace rest by standard memset() and memcpy().
Also use sizeof() instead of literal array sizes for robustness, and
instead of symbolic array sizes for clarity.
This commit is contained in:
Markus Armbruster 2004-01-08 17:54:28 +00:00
parent 2910da23ea
commit 4ae9c417b3
79 changed files with 172 additions and 256 deletions

View file

@ -137,7 +137,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp,
struct sctstr sect;
if ((!player->god || country)) {
bzero((s_char *)bitmap, (WORLD_X * WORLD_Y) / 8);
memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
bitinit2(nsp, bitmap, country);
}
while (nxtsct(nsp, &sect) && !player->aborted) {
@ -177,7 +177,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp,
int changed = 0;
if ((!player->god || country)) {
bzero((s_char *)bitmap, (WORLD_X * WORLD_Y) / 8);
memset(bitmap, 0, (WORLD_X * WORLD_Y) / 8);
bitinit2(nsp, bitmap, country);
}
while (nxtsct(nsp, &sect) && !player->aborted) {