summaryrefslogtreecommitdiffstats
path: root/gomoku
diff options
context:
space:
mode:
authorroy <roy@NetBSD.org>2009-07-13 19:05:39 +0000
committerroy <roy@NetBSD.org>2009-07-13 19:05:39 +0000
commit1a8f73c921695fb365fd62992e90e8d40e94343a (patch)
tree447f607459addcce932c00ca52c03ac9e462c321 /gomoku
parent1f35120ec096783ec21160ac00f22c0fb221a918 (diff)
downloadbsdgames-darwin-1a8f73c921695fb365fd62992e90e8d40e94343a.tar.gz
bsdgames-darwin-1a8f73c921695fb365fd62992e90e8d40e94343a.tar.zst
bsdgames-darwin-1a8f73c921695fb365fd62992e90e8d40e94343a.zip
Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
Diffstat (limited to 'gomoku')
-rw-r--r--gomoku/bdisp.c6
-rw-r--r--gomoku/gomoku.h4
-rw-r--r--gomoku/main.c18
3 files changed, 14 insertions, 14 deletions
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':