diff options
author | roy <roy@NetBSD.org> | 2009-07-13 19:05:39 +0000 |
---|---|---|
committer | roy <roy@NetBSD.org> | 2009-07-13 19:05:39 +0000 |
commit | 1a8f73c921695fb365fd62992e90e8d40e94343a (patch) | |
tree | 447f607459addcce932c00ca52c03ac9e462c321 /gomoku/main.c | |
parent | 1f35120ec096783ec21160ac00f22c0fb221a918 (diff) | |
download | bsdgames-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/main.c')
-rw-r--r-- | gomoku/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
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': |