diff options
author | bapt <bapt@FreeBSD.org> | 2016-07-30 07:39:33 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-07-30 07:39:33 +0800 |
commit | fe35f7d4870555bc55dc35d83ca3ab84dc0639c9 (patch) | |
tree | aac909110e4b23439184cf014dda1090150d68dd /news/newspost | |
parent | 5d4bb9057b815bee3d98a0d50d9c59e85c0eabe6 (diff) | |
download | freebsd-ports-gnome-fe35f7d4870555bc55dc35d83ca3ab84dc0639c9.tar.gz freebsd-ports-gnome-fe35f7d4870555bc55dc35d83ca3ab84dc0639c9.tar.zst freebsd-ports-gnome-fe35f7d4870555bc55dc35d83ca3ab84dc0639c9.zip |
Prevent collision with getline(3)
Diffstat (limited to 'news/newspost')
-rw-r--r-- | news/newspost/files/patch-base_newspost.c | 11 | ||||
-rw-r--r-- | news/newspost/files/patch-base_utils.c | 11 | ||||
-rw-r--r-- | news/newspost/files/patch-base_utils.h | 11 | ||||
-rw-r--r-- | news/newspost/files/patch-ui_options.c | 20 |
4 files changed, 53 insertions, 0 deletions
diff --git a/news/newspost/files/patch-base_newspost.c b/news/newspost/files/patch-base_newspost.c new file mode 100644 index 000000000000..0f1a9e9341c0 --- /dev/null +++ b/news/newspost/files/patch-base_newspost.c @@ -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; diff --git a/news/newspost/files/patch-base_utils.c b/news/newspost/files/patch-base_utils.c new file mode 100644 index 000000000000..9288095a7c66 --- /dev/null +++ b/news/newspost/files/patch-base_utils.c @@ -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){ diff --git a/news/newspost/files/patch-base_utils.h b/news/newspost/files/patch-base_utils.h new file mode 100644 index 000000000000..c590c6441333 --- /dev/null +++ b/news/newspost/files/patch-base_utils.h @@ -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, ... ); diff --git a/news/newspost/files/patch-ui_options.c b/news/newspost/files/patch-ui_options.c new file mode 100644 index 000000000000..ceded22d39ec --- /dev/null +++ b/news/newspost/files/patch-ui_options.c @@ -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) { |