]> git.cameronkatri.com Git - bsdgames-darwin.git/blobdiff - phantasia/misc.c
Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate in
[bsdgames-darwin.git] / phantasia / misc.c
index 89cd940baff485e4347bd319d8dc62455c777445..098b5888851fedb7df47e73ffa260728f5424b2e 100644 (file)
@@ -1,4 +1,4 @@
-/*     $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
@@ -513,7 +513,7 @@ findname(name, playerp)
 {
        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)
@@ -531,7 +531,7 @@ allocrecord()
 {
        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 */
@@ -638,10 +638,10 @@ death(how)
                                                {
                                                        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);
                                                }
@@ -684,7 +684,7 @@ writerecord(playerp, place)
        struct player *playerp;
        long    place;
 {
-       fseek(Playersfp, place, 0);
+       fseek(Playersfp, place, SEEK_SET);
        fwrite((char *) playerp, SZ_PLAYERSTRUCT, 1, Playersfp);
        fflush(Playersfp);
 }
@@ -768,7 +768,7 @@ readrecord(playerp, loc)
        struct player *playerp;
        long    loc;
 {
-       fseek(Playersfp, loc, 0);
+       fseek(Playersfp, loc, SEEK_SET);
        fread((char *) playerp, SZ_PLAYERSTRUCT, 1, Playersfp);
 }
 
@@ -928,7 +928,7 @@ readmessage()
 {
        move(3, 0);
        clrtoeol();
-       fseek(Messagefp, 0L, 0);
+       fseek(Messagefp, 0L, SEEK_SET);
        if (fgets(Databuf, SZ_DATABUF, Messagefp) != NULL)
                addstr(Databuf);
 }
@@ -1064,7 +1064,7 @@ collecttaxes(gold, gems)
                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);
        }