Ticket #30036: patch-mcpp-comment-parsing-fix

File patch-mcpp-comment-parsing-fix, 1.1 KB (added by andrew.edem@…, 13 years ago)

Patch for MCPP 2.7.2 to fix comment parsing problem

Line 
1diff -c -r -N ../mcpp-2.7.2/src/support.c ./src/support.c
2*** ../mcpp-2.7.2/src/support.c 2008-06-10 06:02:33.000000000 -0230
3--- ./src/support.c     2009-12-17 20:42:39.000000000 -0330
4***************
5*** 188,194 ****
6      size_t      length
7  )
8  {
9!     if (mem_buf_p->bytes_avail < length) {  /* Need to allocate more memory */
10          size_t size = MAX( BUF_INCR_SIZE, length);
11 
12          if (mem_buf_p->buffer == NULL) {            /* 1st append   */
13--- 188,194 ----
14      size_t      length
15  )
16  {
17!     if (mem_buf_p->bytes_avail < length + 1) {  /* Need to allocate more memory */
18          size_t size = MAX( BUF_INCR_SIZE, length);
19 
20          if (mem_buf_p->buffer == NULL) {            /* 1st append   */
21***************
22*** 1722,1727 ****
23--- 1722,1729 ----
24                      sp -= 2;
25                      while (*sp != '\n')     /* Until end of line    */
26                          mcpp_fputc( *sp++, OUT);
27+                     mcpp_fputc( '\n', OUT);
28+                     wrong_line = TRUE;
29                  }
30                  goto  end_line;
31              default:                        /* Not a comment        */