This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH]: windres and strings spanning more that one line


Here's the patch I meant to send

Mark Blackburn wrote:

My previous patch was miscounting the current line in the .rc file. This should fix that.

--- binutils-cvs/src/binutils/rclex.l	2003-02-14 17:05:56.000000000 -0500
+++ binutils-me/src/binutils/rclex.l	2003-02-14 17:02:42.000000000 -0500
@@ -196,7 +196,7 @@
 			  MAYBE_RETURN (NUMBER);
 			}
 
-("\""[^\"\n]*"\""[ \t]*)+ {
+("\""[^\"\n]*"\""[ \t\n]*)+ {
 			  char *s;
 			  unsigned long length;
 
@@ -425,7 +425,10 @@
 	  ++t;
 	  assert (ISSPACE (*t));
 	  while (ISSPACE (*t))
+	  {
+	    if ((*t) == '\n') ++rc_lineno;
 	    ++t;
+	  }
 	  if (*t == '\0')
 	    break;
 	  assert (*t == '"');

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]