epp: fix line numbering
authorbilliob <billiob@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Mar 2011 15:55:06 +0000 (15:55 +0000)
committerbilliob <billiob@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Mar 2011 15:55:06 +0000 (15:55 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@57936 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/epp/cpplib.c
src/bin/epp/cppmain.c

index f741e27..d5db450 100644 (file)
@@ -4606,7 +4606,22 @@ cpp_get_token(cpp_reader * pfile)
               }
             else if (CPP_TRADITIONAL(pfile))
               {
-                 return CPP_COMMENT;
+                 if (newlines > 0)
+                    {
+                       output_line_command(pfile, 0, same_file);
+                       return CPP_VSPACE;
+                    }
+                 else
+                   {
+                       return CPP_COMMENT;
+                   }
+              }
+            else if (newlines > 0)
+              {
+                output_line_command(pfile, 0, same_file);
+                CPP_RESERVE(pfile, 1);
+                CPP_PUTC_Q(pfile, ' ');
+                return CPP_VSPACE;
               }
             else
               {
index 0cf2d94..543d418 100644 (file)
@@ -90,8 +90,6 @@ main(int argc, char **argv)
             continue;
 
          case CPP_VSPACE:
-            if (!got_text)
-               goto next;
             break;
 
          default: