[89236] trunk/dports/devel/mcpp

blair at macports.org blair at macports.org
Sat Jan 21 14:35:39 PST 2012


Revision: 89236
          http://trac.macports.org/changeset/89236
Author:   blair at macports.org
Date:     2012-01-21 14:35:37 -0800 (Sat, 21 Jan 2012)
Log Message:
-----------
mcpp: fix support for lines with comments at the end; closes #30036.

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

Added Paths:
-----------
    trunk/dports/devel/mcpp/files/patch-src__support.C

Modified: trunk/dports/devel/mcpp/Portfile
===================================================================
--- trunk/dports/devel/mcpp/Portfile	2012-01-21 22:29:24 UTC (rev 89235)
+++ trunk/dports/devel/mcpp/Portfile	2012-01-21 22:35:37 UTC (rev 89236)
@@ -5,7 +5,7 @@
 
 name                mcpp
 version             2.7.2
-revision            4
+revision            5
 categories          devel
 platforms           darwin
 maintainers         blair openmaintainer
@@ -27,6 +27,7 @@
 checksums           md5 512de48c87ab023a69250edc7a0c7b05 \
                     sha1 703356b7c2cd30d7fb6000625bf3ccc2eb977ecb
 patchfiles          patch-src__internal.H \
+                    patch-src__support.C \
                     patch-src__system.H \
                     patch-fix-core-dumps
 configure.args-append --enable-mcpplib --mandir=${prefix}/share/man

Added: trunk/dports/devel/mcpp/files/patch-src__support.C
===================================================================
--- trunk/dports/devel/mcpp/files/patch-src__support.C	                        (rev 0)
+++ trunk/dports/devel/mcpp/files/patch-src__support.C	2012-01-21 22:35:37 UTC (rev 89236)
@@ -0,0 +1,31 @@
+diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
+*** ../mcpp-2.7.2/src/support.c	2008-06-10 06:02:33.000000000 -0230
+--- ./src/support.c	2009-12-17 20:42:39.000000000 -0330
+***************
+*** 188,194 ****
+      size_t      length
+  )
+  {
+!     if (mem_buf_p->bytes_avail < length) {  /* Need to allocate more memory */
+          size_t size = MAX( BUF_INCR_SIZE, length);
+  
+          if (mem_buf_p->buffer == NULL) {            /* 1st append   */
+--- 188,194 ----
+      size_t      length
+  )
+  {
+!     if (mem_buf_p->bytes_avail < length + 1) {  /* Need to allocate more memory */
+          size_t size = MAX( BUF_INCR_SIZE, length);
+  
+          if (mem_buf_p->buffer == NULL) {            /* 1st append   */
+***************
+*** 1722,1727 ****
+--- 1722,1729 ----
+                      sp -= 2;
+                      while (*sp != '\n')     /* Until end of line    */
+                          mcpp_fputc( *sp++, OUT);
++                     mcpp_fputc( '\n', OUT);
++                     wrong_line = TRUE;
+                  }
+                  goto  end_line;
+              default:                        /* Not a comment        */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120121/beb84610/attachment.html>


More information about the macports-changes mailing list