-/* $NetBSD: misc.c,v 1.5 1999/09/08 21:17:54 jsm Exp $ */
+/* $NetBSD: misc.c,v 1.6 1999/09/08 21:57:19 jsm Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
{
long loc = 0; /* location in the file */
- fseek(Playersfp, 0L, 0);
+ fseek(Playersfp, 0L, SEEK_SET);
while (fread((char *) playerp, SZ_PLAYERSTRUCT, 1, Playersfp) == 1) {
if (strcmp(playerp->p_name, name) == 0) {
if (playerp->p_status != S_NOTUSED || Wizard)
{
long loc = 0L; /* location in file */
- fseek(Playersfp, 0L, 0);
+ fseek(Playersfp, 0L, SEEK_SET);
while (fread((char *) &Other, SZ_PLAYERSTRUCT, 1, Playersfp) == 1) {
if (Other.p_status == S_NOTUSED)
/* found an empty record */
{
mvaddstr(4, 0,
"Your ring has taken control of you and turned you into a monster!\n");
- fseek(Monstfp, 13L * SZ_MONSTERSTRUCT, 0);
+ fseek(Monstfp, 13L * SZ_MONSTERSTRUCT, SEEK_SET);
fread((char *) &Curmonster, SZ_MONSTERSTRUCT, 1, Monstfp);
strcpy(Curmonster.m_name, Player.p_name);
- fseek(Monstfp, 13L * SZ_MONSTERSTRUCT, 0);
+ fseek(Monstfp, 13L * SZ_MONSTERSTRUCT, SEEK_SET);
fwrite((char *) &Curmonster, SZ_MONSTERSTRUCT, 1, Monstfp);
fflush(Monstfp);
}
struct player *playerp;
long place;
{
- fseek(Playersfp, place, 0);
+ fseek(Playersfp, place, SEEK_SET);
fwrite((char *) playerp, SZ_PLAYERSTRUCT, 1, Playersfp);
fflush(Playersfp);
}
struct player *playerp;
long loc;
{
- fseek(Playersfp, loc, 0);
+ fseek(Playersfp, loc, SEEK_SET);
fread((char *) playerp, SZ_PLAYERSTRUCT, 1, Playersfp);
}
{
move(3, 0);
clrtoeol();
- fseek(Messagefp, 0L, 0);
+ fseek(Messagefp, 0L, SEEK_SET);
if (fgets(Databuf, SZ_DATABUF, Messagefp) != NULL)
addstr(Databuf);
}
dtemp = 0.0;
fread((char *) &dtemp, sizeof(double), 1, fp);
dtemp += floor(taxes);
- fseek(fp, 0L, 0);
+ fseek(fp, 0L, SEEK_SET);
fwrite((char *) &dtemp, sizeof(double), 1, fp);
fclose(fp);
}