From owner-svn-ports-head@freebsd.org Wed May 11 21:58:10 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10BD6B37C18; Wed, 11 May 2016 21:58:10 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD7AB1E71; Wed, 11 May 2016 21:58:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4BLw8qv031758; Wed, 11 May 2016 21:58:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4BLw8du031757; Wed, 11 May 2016 21:58:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201605112158.u4BLw8du031757@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 May 2016 21:58:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415040 - head/games/xsokoban/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 21:58:10 -0000 Author: bapt Date: Wed May 11 21:58:08 2016 New Revision: 415040 URL: https://svnweb.freebsd.org/changeset/ports/415040 Log: Prevent collision with getline(3) Added: head/games/xsokoban/files/patch-score.c (contents, props changed) Added: head/games/xsokoban/files/patch-score.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/xsokoban/files/patch-score.c Wed May 11 21:58:08 2016 (r415040) @@ -0,0 +1,56 @@ +--- score.c.orig 1996-08-27 19:23:58 UTC ++++ score.c +@@ -797,7 +797,7 @@ static void CopyEntry(short i1, short i2 + } + + /* Extract one line from "text". Return 0 if there is no line to extract. */ +-char *getline(char *text, char *linebuf, int bufsiz) ++char *get_line(char *text, char *linebuf, int bufsiz) + { + if (*text == 0) { + *linebuf = 0; +@@ -938,7 +938,7 @@ char *skip_past_header(char *text) + { + char line[256]; + do { +- text = getline(text, line, sizeof(line)); ++ text = get_line(text, line, sizeof(line)); + if (!text) return 0; + } while (0 != strcmp(line, "")); + return text; +@@ -982,7 +982,7 @@ static short ParseUserLevel(char *text, + char line[256]; + text = skip_past_header(text); + if (!text) return E_READSCORE; +- text = getline(text, line, sizeof(line)); ++ text = get_line(text, line, sizeof(line)); + if (!text) return E_READSCORE; + if (0 == strncmp(line, "Level: ", 7)) { + *lv = atoi(&line[7]); +@@ -999,7 +999,7 @@ static void DeleteAllEntries() + } + + #define GRAB(tag, stmt) \ +- text = getline(text, line, sizeof(line)); \ ++ text = get_line(text, line, sizeof(line)); \ + if (!text) return E_READSCORE; \ + if (0 == strncmp(line, tag, strlen(tag))) { stmt; } \ + else return E_READSCORE; +@@ -1070,7 +1070,7 @@ static short ParseScoreText(char *text, + { + char line[256]; + do { +- text = getline(text, line, sizeof(line)); ++ text = get_line(text, line, sizeof(line)); + if (!text) return E_READSCORE; + } while (line[0] != '='); + scoreentries = 0; +@@ -1091,7 +1091,7 @@ static short ParseScoreLine(int i, char + int rank; + char rank_s[4]; + char line[256]; +- *text = getline(*text, line, sizeof(line)); ++ *text = get_line(*text, line, sizeof(line)); + if (!*text) return 0; + strncpy(rank_s, line, 4); + rank = atoi(rank_s);