[93528] trunk/dports/devel/noweb

jmr at macports.org jmr at macports.org
Fri May 25 14:35:47 PDT 2012


Revision: 93528
          https://trac.macports.org/changeset/93528
Author:   jmr at macports.org
Date:     2012-05-25 14:35:46 -0700 (Fri, 25 May 2012)
Log Message:
-----------
noweb: rename internal getline function to avoid conflict (#31210)

Modified Paths:
--------------
    trunk/dports/devel/noweb/Portfile

Added Paths:
-----------
    trunk/dports/devel/noweb/files/patch-getline.diff

Modified: trunk/dports/devel/noweb/Portfile
===================================================================
--- trunk/dports/devel/noweb/Portfile	2012-05-25 20:20:19 UTC (rev 93527)
+++ trunk/dports/devel/noweb/Portfile	2012-05-25 21:35:46 UTC (rev 93528)
@@ -23,7 +23,7 @@
 			sha1 3b391c42f46dcb8a002b863fb2e483560a7da51d \
 			rmd160 01e4fbb636dfd0f6d117caa045cf105e49d25fca
 worksrcdir		${name}-${version}/src
-patchfiles		patch-Makefile.diff
+patchfiles		patch-Makefile.diff patch-getline.diff
 
 depends_build		port:icon
 depends_run		port:icon

Added: trunk/dports/devel/noweb/files/patch-getline.diff
===================================================================
--- trunk/dports/devel/noweb/files/patch-getline.diff	                        (rev 0)
+++ trunk/dports/devel/noweb/files/patch-getline.diff	2012-05-25 21:35:46 UTC (rev 93528)
@@ -0,0 +1,101 @@
+--- c/finduses.c.orig	2006-06-13 07:16:23.000000000 +1000
++++ c/finduses.c	2012-05-26 07:31:31.000000000 +1000
+@@ -49,7 +49,7 @@ main(int argc, char **argv) {
+ #line 155 "finduses.nw"
+ errormsg(Fatal, "%s: couldn't open temporary file\n", progname);
+ #line 78 "finduses.nw"
+-    while ((line = getline(stdin)) != NULL) {
++    while ((line = noweb_getline(stdin)) != NULL) {
+         if (fputs(line, tmp) == EOF) 
+ #line 157 "finduses.nw"
+ errormsg(Fatal, "%s: error writing temporary file\n", progname);
+@@ -89,7 +89,7 @@ for (; i < argc; i++)
+ #line 66 "finduses.nw"
+ static void read_ids(FILE *in) {
+     char *line;
+-    while ((line = getline(in)) != NULL) {
++    while ((line = noweb_getline(in)) != NULL) {
+         if (line[strlen(line)-1] == '\n') line[strlen(line)-1] = 0;
+         add_ident(nwindex, line);
+     }
+@@ -100,7 +100,7 @@ static void add_use_markers(FILE *in, FI
+     int incode = 0;
+     LineOut info; info.line = (char *)0; info.out = out;
+     
+-    while ((line = getline(in)) != NULL) {
++    while ((line = noweb_getline(in)) != NULL) {
+         if (is_begin(line, "code") || showquotes && is_keyword(line, "quote"))
+             incode = 1;
+         else if (is_end(line, "code") || is_keyword(line, "endquote"))
+--- c/getline.c.orig	2006-06-13 07:16:23.000000000 +1000
++++ c/getline.c	2012-05-26 07:31:16.000000000 +1000
+@@ -19,7 +19,7 @@ void new_buffers(void) {
+     checkptr(buf2 = (char *) realloc(buf2, buf_size));
+ }
+ #line 47 "getline.nw"
+-char *getline (FILE *fp) {
++char *noweb_getline (FILE *fp) {
+ 
+     
+ #line 82 "getline.nw"
+@@ -44,7 +44,7 @@ char *getline_expand (FILE *fp) {
+     char *s, *t;
+     int width;
+ 
+-    if (getline(fp)==NULL) return NULL;
++    if (noweb_getline(fp)==NULL) return NULL;
+     
+ #line 87 "getline.nw"
+ if (columnwidth(buf1) > buf_size - 1) {
+--- c/getline.h.orig	2006-06-13 07:16:23.000000000 +1000
++++ c/getline.h	2012-05-26 07:30:41.000000000 +1000
+@@ -1,6 +1,6 @@
+ char *getline_expand (FILE *fp);
+   /* grab a line in buffer, return new buffer or NULL for eof
+      tabs in line are expanded according to tabsize */
+-char *getline (FILE *fp);
++char *noweb_getline (FILE *fp);
+   /* grab a line in the buffer, return a new buffer or NULL for eof
+      no expansion of tabs */
+--- c/notangle.c.orig	2006-06-13 07:16:23.000000000 +1000
++++ c/notangle.c	2012-05-26 07:30:25.000000000 +1000
+@@ -44,7 +44,7 @@ void read_defs(FILE *in) {
+     char *line = NULL;          /* buffer for input */
+     Location loc;
+ 
+-    while ((line = getline(in)) != NULL) {
++    while ((line = noweb_getline(in)) != NULL) {
+         if (is_keyword(line, "fatal")) exit(1);
+         
+ #line 101 "notangle.nw"
+@@ -90,7 +90,7 @@ if (!is_begin(line, "code"))
+ #line 66 "notangle.nw"
+         
+ #line 97 "notangle.nw"
+-do { line = getline(in);
++do { line = noweb_getline(in);
+ } while (line != NULL && !is_keyword(line,"defn") && !is_keyword(line,"text"));
+ #line 67 "notangle.nw"
+         insist(line,"defn","code chunk had no definition line");
+@@ -102,10 +102,10 @@ modname[strlen(modname)-1]='\0';
+         warn_dots(modname);       /* names ending in ... aren't like web */
+         modptr = insert(modname); /* find or add module in table */
+ 
+-        line = getline(in);
++        line = noweb_getline(in);
+         insist(line,"nl","definition line not followed by newline");
+         loc.lineno++;
+-        line = getline(in);
++        line = noweb_getline(in);
+         while (line != NULL && !is_end(line,"code")) {
+             if (is_keyword(line,"nl")) {
+                 addnewline(modptr);
+@@ -157,7 +157,7 @@ modname[strlen(modname)-1]='\0';
+ #line 182 "notangle.nw"
+ errorat(loc.filename, loc.lineno, Error, "botched code chunk `%s'", line);
+ #line 90 "notangle.nw"
+-            line = getline(in);
++            line = noweb_getline(in);
+         }
+         
+ #line 176 "notangle.nw"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120525/ab09a779/attachment.html>


More information about the macports-changes mailing list