Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/boggle/boggle From PR 7988 by Joseph Myers <jsm28@cam....



details:   https://anonhg.NetBSD.org/src/rev/b0a3af1f390a
branches:  trunk
changeset: 474649:b0a3af1f390a
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Wed Jul 14 17:23:53 1999 +0000

description:
>From PR 7988 by Joseph Myers <jsm28%cam.ac.uk@localhost>: use the symbolic
name SEEK_SET for values which end up as the third argument of
fseek(), rather than a hard-coded 0.

diffstat:

 games/boggle/boggle/bog.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 313a1462ac9e -r b0a3af1f390a games/boggle/boggle/bog.c
--- a/games/boggle/boggle/bog.c Wed Jul 14 17:21:03 1999 +0000
+++ b/games/boggle/boggle/bog.c Wed Jul 14 17:23:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bog.c,v 1.9 1998/08/30 09:19:36 veego Exp $    */
+/*     $NetBSD: bog.c,v 1.10 1999/07/14 17:23:53 hubertf Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)bog.c      8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: bog.c,v 1.9 1998/08/30 09:19:36 veego Exp $");
+__RCSID("$NetBSD: bog.c,v 1.10 1999/07/14 17:23:53 hubertf Exp $");
 #endif
 #endif /* not lint */
 
@@ -501,7 +501,7 @@
        char *q, *w;
 
        j = word[0] - 'a';
-       if (dictseek(dictfp, dictindex[j].start, 0) < 0) {
+       if (dictseek(dictfp, dictindex[j].start, SEEK_SET) < 0) {
                (void) fprintf(stderr, "Seek error\n");
                cleanup();
                exit(1);
@@ -541,7 +541,7 @@
        prevch ='a';
        qi = &wordpath[MAXWORDLEN + 1];
 
-       (void) dictseek(dictfp, 0L, 0);
+       (void) dictseek(dictfp, 0L, SEEK_SET);
        while ((w = nextword(dictfp)) != NULL) {
                if (wordlen < minlength)
                        continue;
@@ -568,7 +568,7 @@
                         */
                        if (i != previndex + 1) {
                                if (dictseek(dictfp,
-                                   dictindex[i].start, 0) < 0) {
+                                   dictindex[i].start, SEEK_SET) < 0) {
                                        warnx("seek error in checkdict()");
                                        cleanup();
                                        exit(1);



Home | Main Index | Thread Index | Old Index