File: do_not_define_conflicting_getline.patch

package info (click to toggle)
lagan 2.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,468 kB
  • sloc: ansic: 8,543; perl: 7,732; cpp: 3,260; makefile: 86
file content (24 lines) | stat: -rw-r--r-- 711 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: Andreas Tille <tille@debian.org>
LastChanged: Fri, 15 Nov 2013 10:31:20 +0100
Description: Prevent conflicting getline by simply renaming it

--- a/src/anchors.c
+++ b/src/anchors.c
@@ -225,7 +225,7 @@ char* rolltonum(char* str) {
   return &str[i];
 }
 
-int getline(FILE* infile, hll* tt) {
+int anchors_getline(FILE* infile, hll* tt) {
   char temp[1024];
   char* help;
   int z, h;
@@ -248,7 +248,7 @@ hll* parseCHAOS(FILE* infile, int* totnu
   *totnum = 0;
   while(!feof(infile)) {
     tt = (hll*) malloc(sizeof(hll));
-    while (!feof(infile) && !getline(infile, tt))
+    while (!feof(infile) && !anchors_getline(infile, tt))
       ;
     if (feof(infile)) break;
     if (gapfreechunks) {