(file_sct_init, fl_sct_init): Fix parameter type from s_char * to

struct sctstr *.  Callers changed not to cast.
This commit is contained in:
Markus Armbruster 2006-03-26 15:07:32 +00:00
parent 5d6e8c0685
commit 053847beac
2 changed files with 6 additions and 10 deletions

View file

@ -175,8 +175,7 @@ static int stable(void);
static void elevate_land(void);
static void elevate_sea(void);
static int map_symbol(int x, int y);
static void fl_sct_init(coord x, coord y, s_char *ptr,
time_t timestamp);
static void fl_sct_init(coord, coord, struct sctstr *, time_t timestamp);
static void set_coastal_flags(void);
static void print_vars(void);
@ -1091,7 +1090,7 @@ write_sects(void)
sct = sectsbuf;
for (y = 0; y < YSIZE; y++) {
for (x = 0; x < XSIZE; x++, sct++) {
fl_sct_init(x * 2 + (y & 01), y, (s_char *)sct, current_time);
fl_sct_init(x * 2 + (y & 1), y, sct, current_time);
total = elev[sct->sct_x][y];
if (total < LANDMIN) {
sct->sct_type = SCT_WATER;
@ -1219,10 +1218,8 @@ qprint(const char * const fmt, ...)
}
static void
fl_sct_init(coord x, coord y, s_char *ptr, time_t timestamp)
fl_sct_init(coord x, coord y, struct sctstr *sp, time_t timestamp)
{
struct sctstr *sp = (struct sctstr *)ptr;
sp->ef_type = EF_SECTOR;
sp->sct_x = x;
sp->sct_y = y;

View file

@ -63,7 +63,7 @@
#include "optlist.h"
#include "version.h"
static void file_sct_init(coord x, coord y, s_char *ptr,
static void file_sct_init(coord, coord, struct sctstr *ptr,
time_t timestamp);
static void
@ -195,8 +195,7 @@ main(int argc, char *argv[])
memset(&sct, 0, sizeof(sct));
for (y = 0; y < WORLD_Y; y++) {
for (x = 0; x < WORLD_X / 2; x++) {
file_sct_init(x * 2 + (y & 01), y, (s_char *)&sct,
current_time);
file_sct_init(x * 2 + (y & 1), y, &sct, current_time);
putsect(&sct);
}
}
@ -218,7 +217,7 @@ main(int argc, char *argv[])
}
static void
file_sct_init(coord x, coord y, s_char *ptr, time_t timestamp)
file_sct_init(coord x, coord y, struct sctstr *ptr, time_t timestamp)
{
struct sctstr *sp = (struct sctstr *)ptr;