diff options
author | jsm <jsm@NetBSD.org> | 1999-09-08 21:57:16 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 1999-09-08 21:57:16 +0000 |
commit | 56b3b679266d099eba0ac4e8282b239c652357c3 (patch) | |
tree | 7e3a0748576fc3fd8c50331f1d419996a73538fd /fortune | |
parent | 82852318e37fa7eddacc3dd162a2d16d3a7487b9 (diff) | |
download | bsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.tar.gz bsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.tar.zst bsdgames-darwin-56b3b679266d099eba0ac4e8282b239c652357c3.zip |
Use the symbolic names `SEEK_SET' and `O_RDONLY' where appropriate in
the games.
Diffstat (limited to 'fortune')
-rw-r--r-- | fortune/fortune/fortune.c | 10 | ||||
-rw-r--r-- | fortune/strfile/strfile.c | 12 | ||||
-rw-r--r-- | fortune/unstr/unstr.c | 6 |
3 files changed, 14 insertions, 14 deletions
diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c index 09ba4c45..1839e15e 100644 --- a/fortune/fortune/fortune.c +++ b/fortune/fortune/fortune.c @@ -1,4 +1,4 @@ -/* $NetBSD: fortune.c,v 1.17 1999/09/08 21:45:27 jsm Exp $ */ +/* $NetBSD: fortune.c,v 1.18 1999/09/08 21:57:16 jsm Exp $ */ /*- * Copyright (c) 1986, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\n\ #if 0 static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: fortune.c,v 1.17 1999/09/08 21:45:27 jsm Exp $"); +__RCSID("$NetBSD: fortune.c,v 1.18 1999/09/08 21:57:16 jsm Exp $"); #endif #endif /* not lint */ @@ -260,7 +260,7 @@ display(fp) char line[BUFSIZ]; open_fp(fp); - (void) fseek(fp->inf, (long)Seekpts[0], 0); + (void) fseek(fp->inf, (long)Seekpts[0], SEEK_SET); for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && !STR_ENDSTRING(line, fp->tbl); Fort_len++) { if (fp->tbl.str_flags & STR_ROTATED) { @@ -289,7 +289,7 @@ fortlen() nchar = (Seekpts[1] - Seekpts[0] <= SLEN); else { open_fp(Fortfile); - (void) fseek(Fortfile->inf, (long)Seekpts[0], 0); + (void) fseek(Fortfile->inf, (long)Seekpts[0], SEEK_SET); nchar = 0; while (fgets(line, sizeof line, Fortfile->inf) != NULL && !STR_ENDSTRING(line, Fortfile->tbl)) @@ -990,7 +990,7 @@ get_fort() get_pos(fp); open_dat(fp); (void) lseek(fp->datfd, - (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), 0); + (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), SEEK_SET); read(fp->datfd, Seekpts, sizeof Seekpts); BE64TOH(Seekpts[0]); BE64TOH(Seekpts[1]); diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c index 69357391..9218a507 100644 --- a/fortune/strfile/strfile.c +++ b/fortune/strfile/strfile.c @@ -1,4 +1,4 @@ -/* $NetBSD: strfile.c,v 1.10 1999/09/08 21:17:49 jsm Exp $ */ +/* $NetBSD: strfile.c,v 1.11 1999/09/08 21:57:17 jsm Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\ #if 0 static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: strfile.c,v 1.10 1999/09/08 21:17:49 jsm Exp $"); +__RCSID("$NetBSD: strfile.c,v 1.11 1999/09/08 21:57:17 jsm Exp $"); #endif #endif /* not lint */ @@ -175,7 +175,7 @@ main(ac, av) if ((outf = fopen(Outfile, "w")) == NULL) err(1, "open `%s'", Outfile); if (!STORING_PTRS) - (void) fseek(outf, sizeof Tbl, 0); + (void) fseek(outf, sizeof Tbl, SEEK_SET); /* * Write the strings onto the file @@ -243,7 +243,7 @@ main(ac, av) Tbl.str_shortlen == 1 ? "" : "s"); } - (void) fseek(outf, (off_t) 0, 0); + (void) fseek(outf, (off_t) 0, SEEK_SET); HTOBE32(Tbl.str_version); Tbl.str_numstr = htobe32(Num_pts - 1); HTOBE32(Tbl.str_longlen); @@ -411,8 +411,8 @@ cmp_str(vp1, vp2) if (c1 != c2) return c1 - c2; - (void) fseek(Sort_1, p1->pos, 0); - (void) fseek(Sort_2, p2->pos, 0); + (void) fseek(Sort_1, p1->pos, SEEK_SET); + (void) fseek(Sort_2, p2->pos, SEEK_SET); n1 = FALSE; n2 = FALSE; diff --git a/fortune/unstr/unstr.c b/fortune/unstr/unstr.c index 8d52fc35..b851c40f 100644 --- a/fortune/unstr/unstr.c +++ b/fortune/unstr/unstr.c @@ -1,4 +1,4 @@ -/* $NetBSD: unstr.c,v 1.5 1999/08/21 07:02:46 simonb Exp $ */ +/* $NetBSD: unstr.c,v 1.6 1999/09/08 21:57:17 jsm Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\ #if 0 static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: unstr.c,v 1.5 1999/08/21 07:02:46 simonb Exp $"); +__RCSID("$NetBSD: unstr.c,v 1.6 1999/09/08 21:57:17 jsm Exp $"); #endif #endif /* not lint */ @@ -140,7 +140,7 @@ order_unstr(tbl) for (i = 0; i < tbl->str_numstr; i++) { (void) fread((char *) &pos, 1, sizeof pos, Dataf); - (void) fseek(Inf, be64toh(pos), 0); + (void) fseek(Inf, be64toh(pos), SEEK_SET); if (i != 0) (void) printf("%c\n", Delimch); for (;;) { |