Date: Fri, 29 Jul 2016 23:39:33 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419282 - head/news/newspost/files Message-ID: <201607292339.u6TNdXOc026408@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Fri Jul 29 23:39:33 2016 New Revision: 419282 URL: https://svnweb.freebsd.org/changeset/ports/419282 Log: Prevent collision with getline(3) Added: head/news/newspost/files/patch-base_newspost.c (contents, props changed) head/news/newspost/files/patch-base_utils.c (contents, props changed) head/news/newspost/files/patch-base_utils.h (contents, props changed) head/news/newspost/files/patch-ui_options.c (contents, props changed) Added: head/news/newspost/files/patch-base_newspost.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_newspost.c Fri Jul 29 23:39:33 2016 (r419282) @@ -0,0 +1,11 @@ +--- base/newspost.c.orig 2003-04-23 15:33:23 UTC ++++ base/newspost.c +@@ -342,7 +342,7 @@ static Buff *read_text_file(Buff *text_b + file = fopen(filename, "r"); + if (file != NULL) { + while (!feof(file)) { +- line = getline(line, file); ++ line = get_line(line, file); + if(line == NULL){ + text_buffer = buff_add(text_buffer, "\r\n"); + continue; Added: head/news/newspost/files/patch-base_utils.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_utils.c Fri Jul 29 23:39:33 2016 (r419282) @@ -0,0 +1,11 @@ +--- base/utils.c.orig 2003-04-23 15:33:23 UTC ++++ base/utils.c +@@ -43,7 +43,7 @@ file_entry * file_entry_free(file_entry + return NULL; + } + +-Buff * getline(Buff *buff, FILE *file){ ++Buff * get_line(Buff *buff, FILE *file){ + char c = fgetc(file); + buff = buff_free(buff); + while(TRUE){ Added: head/news/newspost/files/patch-base_utils.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-base_utils.h Fri Jul 29 23:39:33 2016 (r419282) @@ -0,0 +1,11 @@ +--- base/utils.h.orig 2003-02-08 15:09:41 UTC ++++ base/utils.h +@@ -26,7 +26,7 @@ file_entry; + file_entry * file_entry_alloc(); + file_entry * file_entry_free(file_entry *fe); + +-Buff * getline(Buff *buff, FILE *file); ++Buff * get_line(Buff *buff, FILE *file); + Buff *buff_add(Buff *buff, char *data, ... ); + Buff * buff_free(Buff *buff); + Buff *buff_create(Buff *buff, char *data, ... ); Added: head/news/newspost/files/patch-ui_options.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/news/newspost/files/patch-ui_options.c Fri Jul 29 23:39:33 2016 (r419282) @@ -0,0 +1,20 @@ +--- ui/options.c.orig 2003-04-23 15:33:33 UTC ++++ ui/options.c +@@ -332,7 +332,7 @@ void parse_defaults(newspost_data *data) + file = fopen(filename->data, "r"); + if (file != NULL) { + while (!feof(file)) { +- line = getline(line, file); ++ line = get_line(line, file); + linenum++; + if(line == NULL) continue; + +@@ -429,7 +429,7 @@ void parse_defaults(newspost_data *data) + linenum = 0; + while (linenum < 8) { + linenum++; +- line = getline(line, file); ++ line = get_line(line, file); + if(line == NULL) continue; + + switch (linenum) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607292339.u6TNdXOc026408>