diff options
-rw-r--r-- | boggle/boggle/bog.c | 6 | ||||
-rw-r--r-- | boggle/boggle/extern.h | 4 | ||||
-rw-r--r-- | boggle/boggle/mach.c | 6 | ||||
-rw-r--r-- | cribbage/crib.c | 8 | ||||
-rw-r--r-- | cribbage/cribbage.h | 4 | ||||
-rw-r--r-- | cribbage/io.c | 12 | ||||
-rw-r--r-- | gomoku/bdisp.c | 6 | ||||
-rw-r--r-- | gomoku/gomoku.h | 4 | ||||
-rw-r--r-- | gomoku/main.c | 18 |
9 files changed, 34 insertions, 34 deletions
diff --git a/boggle/boggle/bog.c b/boggle/boggle/bog.c index fb9ff520..edb0a93c 100644 --- a/boggle/boggle/bog.c +++ b/boggle/boggle/bog.c @@ -1,4 +1,4 @@ -/* $NetBSD: bog.c,v 1.22 2008/07/20 01:03:21 lukem Exp $ */ +/* $NetBSD: bog.c,v 1.23 2009/07/13 19:05:39 roy Exp $ */ /*- * Copyright (c) 1993 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\ #if 0 static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: bog.c,v 1.22 2008/07/20 01:03:21 lukem Exp $"); +__RCSID("$NetBSD: bog.c,v 1.23 2009/07/13 19:05:39 roy Exp $"); #endif #endif /* not lint */ @@ -334,7 +334,7 @@ playgame(void) } while (1) { - if (getline(buf) == NULL) { + if (get_line(buf) == NULL) { if (feof(stdin)) clearerr(stdin); break; diff --git a/boggle/boggle/extern.h b/boggle/boggle/extern.h index 05e5b9ac..7c06ea75 100644 --- a/boggle/boggle/extern.h +++ b/boggle/boggle/extern.h @@ -1,4 +1,4 @@ -/* $NetBSD: extern.h,v 1.9 2005/07/01 16:38:24 jmc Exp $ */ +/* $NetBSD: extern.h,v 1.10 2009/07/13 19:05:39 roy Exp $ */ /*- * Copyright (c) 1993 @@ -43,7 +43,7 @@ void delay(int); long dictseek(FILE *, long, int); void findword(void); void flushin(FILE *); -char *getline(char *); +char *get_line(char *); void getword(char *); int help(void); int inputch(void); diff --git a/boggle/boggle/mach.c b/boggle/boggle/mach.c index aaaacbbb..ba68287c 100644 --- a/boggle/boggle/mach.c +++ b/boggle/boggle/mach.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach.c,v 1.18 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: mach.c,v 1.19 2009/07/13 19:05:39 roy Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)mach.c 8.1 (Berkeley) 6/11/93"; #else -__RCSID("$NetBSD: mach.c,v 1.18 2008/08/08 16:10:47 drochner Exp $"); +__RCSID("$NetBSD: mach.c,v 1.19 2009/07/13 19:05:39 roy Exp $"); #endif #endif /* not lint */ @@ -162,7 +162,7 @@ prwidth(const char *const base[], int indx) * - doesn't accept words longer than MAXWORDLEN or containing caps */ char * -getline(char *q) +get_line(char *q) { int ch, done; char *p; diff --git a/cribbage/crib.c b/cribbage/crib.c index ee8e2d6f..75d5d77d 100644 --- a/cribbage/crib.c +++ b/cribbage/crib.c @@ -1,4 +1,4 @@ -/* $NetBSD: crib.c,v 1.22 2008/08/08 16:10:47 drochner Exp $ */ +/* $NetBSD: crib.c,v 1.23 2009/07/13 19:05:40 roy Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\ #if 0 static char sccsid[] = "@(#)crib.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: crib.c,v 1.22 2008/08/08 16:10:47 drochner Exp $"); +__RCSID("$NetBSD: crib.c,v 1.23 2009/07/13 19:05:40 roy Exp $"); #endif #endif /* not lint */ @@ -218,7 +218,7 @@ game(void) if (!rflag) { /* player cuts deck */ msg(quiet ? "Cut for crib? " : "Cut to see whose crib it is -- low card wins? "); - getline(); + get_line(); } i = (rand() >> 4) % CARDS; /* random cut */ do { /* comp cuts deck */ @@ -389,7 +389,7 @@ cut(BOOLEAN mycrib, int pos) if (!rflag) { /* random cut */ msg(quiet ? "Cut the deck? " : "How many cards down do you wish to cut the deck? "); - getline(); + get_line(); } i = (rand() >> 4) % (CARDS - pos); turnover = deck[i + pos]; diff --git a/cribbage/cribbage.h b/cribbage/cribbage.h index 0cd1e792..cfe2a7fb 100644 --- a/cribbage/cribbage.h +++ b/cribbage/cribbage.h @@ -1,4 +1,4 @@ -/* $NetBSD: cribbage.h,v 1.13 2005/07/02 08:32:32 jmc Exp $ */ +/* $NetBSD: cribbage.h,v 1.14 2009/07/13 19:05:40 roy Exp $ */ /* * Copyright (c) 1980, 1993 @@ -76,7 +76,7 @@ int eq(CARD, CARD); int fifteens(const CARD [], int); void game(void); void gamescore(void); -char *getline(void); +char *get_line(void); int getuchar(void); int incard(CARD *); int infrom(const CARD [], int, const char *); diff --git a/cribbage/io.c b/cribbage/io.c index b661f2c9..8bf6ee62 100644 --- a/cribbage/io.c +++ b/cribbage/io.c @@ -1,4 +1,4 @@ -/* $NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $ */ +/* $NetBSD: io.c,v 1.23 2009/07/13 19:05:40 roy Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: io.c,v 1.22 2009/06/04 04:48:04 dholland Exp $"); +__RCSID("$NetBSD: io.c,v 1.23 2009/07/13 19:05:40 roy Exp $"); #endif #endif /* not lint */ @@ -226,7 +226,7 @@ incard(CARD *crd) retval = FALSE; rnk = sut = EMPTY; - if (!(line = getline())) + if (!(line = get_line())) goto gotit; p = p1 = line; while (*p1 != ' ' && *p1 != '\0') @@ -325,7 +325,7 @@ number(int lo, int hi, const char *prompt) for (sum = 0;;) { msg(prompt); - if (!(p = getline()) || *p == '\0') { + if (!(p = get_line()) || *p == '\0') { msg(quiet ? "Not a number" : "That doesn't look like a number"); continue; @@ -506,12 +506,12 @@ over: } /* - * getline: + * get_line: * Reads the next line up to '\n' or EOF. Multiple spaces are * compressed to one space; a space is inserted before a ',' */ char * -getline(void) +get_line(void) { char *sp; int c, oy, ox; diff --git a/gomoku/bdisp.c b/gomoku/bdisp.c index c7539968..a5e25ebd 100644 --- a/gomoku/bdisp.c +++ b/gomoku/bdisp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bdisp.c,v 1.11 2009/06/04 05:43:29 dholland Exp $ */ +/* $NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $ */ /* * Copyright (c) 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)bdisp.c 8.2 (Berkeley) 5/3/95"; #else -__RCSID("$NetBSD: bdisp.c,v 1.11 2009/06/04 05:43:29 dholland Exp $"); +__RCSID("$NetBSD: bdisp.c,v 1.12 2009/07/13 19:05:40 roy Exp $"); #endif #endif /* not lint */ @@ -241,7 +241,7 @@ ask(const char *str) } int -getline(char *buf, int size) +get_line(char *buf, int size) { char *cp, *end; int c; diff --git a/gomoku/gomoku.h b/gomoku/gomoku.h index 87229e10..16a437ae 100644 --- a/gomoku/gomoku.h +++ b/gomoku/gomoku.h @@ -1,4 +1,4 @@ -/* $NetBSD: gomoku.h,v 1.15 2009/06/04 06:47:36 dholland Exp $ */ +/* $NetBSD: gomoku.h,v 1.16 2009/07/13 19:05:40 roy Exp $ */ /* * Copyright (c) 1994 @@ -262,7 +262,7 @@ extern int debug; void bdinit(struct spotstr *); void init_overlap(void); -int getline(char *, int); +int get_line(char *, int); void ask(const char *); void dislog(const char *); void bdump(FILE *); diff --git a/gomoku/main.c b/gomoku/main.c index e29cc42e..79c3f18a 100644 --- a/gomoku/main.c +++ b/gomoku/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.18 2009/06/04 07:01:16 dholland Exp $ */ +/* $NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $ */ /* * Copyright (c) 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\ #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: main.c,v 1.18 2009/06/04 07:01:16 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.19 2009/07/13 19:05:40 roy Exp $"); #endif #endif /* not lint */ @@ -153,7 +153,7 @@ again: if (inputfp == NULL && test == 0) { for (;;) { ask("black or white? "); - getline(buf, sizeof(buf)); + get_line(buf, sizeof(buf)); if (buf[0] == 'b' || buf[0] == 'B') { color = BLACK; break; @@ -170,7 +170,7 @@ again: } } else { setbuf(stdout, 0); - getline(buf, sizeof(buf)); + get_line(buf, sizeof(buf)); if (strcmp(buf, "black") == 0) color = BLACK; else if (strcmp(buf, "white") == 0) @@ -240,7 +240,7 @@ again: getinput: if (interactive) ask("move? "); - if (!getline(buf, sizeof(buf))) { + if (!get_line(buf, sizeof(buf))) { curmove = RESIGN; break; } @@ -252,7 +252,7 @@ again: FILE *fp; ask("save file name? "); - (void)getline(buf, sizeof(buf)); + (void)get_line(buf, sizeof(buf)); if ((fp = fopen(buf, "w")) == NULL) { misclog("cannot create save file"); goto getinput; @@ -304,14 +304,14 @@ again: if (i != RESIGN) { replay: ask("replay? "); - if (getline(buf, sizeof(buf)) && + if (get_line(buf, sizeof(buf)) && (buf[0] == 'y' || buf[0] == 'Y')) goto again; if (strcmp(buf, "save") == 0) { FILE *fp; ask("save file name? "); - (void)getline(buf, sizeof(buf)); + (void)get_line(buf, sizeof(buf)); if ((fp = fopen(buf, "w")) == NULL) { misclog("cannot create save file"); goto replay; @@ -363,7 +363,7 @@ whatsup(int signum) quit(); top: ask("cmd? "); - if (!getline(input, sizeof(input))) + if (!get_line(input, sizeof(input))) quit(); switch (*input) { case '\0': |