]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* input-scrub.c (input_scrub_next_buffer): Use TC_EOL_IN_INSN
authorBernd Schmidt <bernds@codesourcery.com>
Mon, 16 Oct 2006 12:02:40 +0000 (12:02 +0000)
committerBernd Schmidt <bernds@codesourcery.com>
Mon, 16 Oct 2006 12:02:40 +0000 (12:02 +0000)
in addition to testing for '\n'.
(TC_EOL_IN_INSN): Provide a default definition if necessary.

gas/ChangeLog
gas/input-scrub.c

index d7681b7dbf431143d47d7d90be8a88b43a4de10b..72738971b0e59e9008783b45e42f08cffd2300a8 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-16  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * input-scrub.c (input_scrub_next_buffer): Use TC_EOL_IN_INSN
+       in addition to testing for '\n'.
+       (TC_EOL_IN_INSN): Provide a default definition if necessary.
+
 2006-10-13  Sterling Augstine  <sterling@tensilica.com>
 
        * dwarf2dbg.c (out_debug_info): Use TC_DWARF2_EMIT_OFFSET to emit
index 7407741b3fa538c398f60e12cc9d3818abafb335..9efea1100e2a68c004c087f93fa80d9235e4e5b5 100644 (file)
 #define BEFORE_SIZE (1)
 #define AFTER_SIZE  (1)
 
+#ifndef TC_EOL_IN_INSN
+#define TC_EOL_IN_INSN(P) 0
+#endif
+
 static char *buffer_start;     /*->1st char of full buffer area.  */
 static char *partial_where;    /*->after last full line in buffer.  */
 static int partial_size;       /* >=0. Number of chars in partial line in buffer.  */
@@ -341,8 +345,9 @@ input_scrub_next_buffer (char **bufp)
   if (limit)
     {
       register char *p;                /* Find last newline.  */
-
-      for (p = limit - 1; *p != '\n'; --p)
+      /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN.  */
+      *limit = '\0';
+      for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
        ;
       ++p;
 
@@ -368,7 +373,9 @@ input_scrub_next_buffer (char **bufp)
              return NULL;
            }
 
-         for (p = limit - 1; *p != '\n'; --p)
+         /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN.  */
+         *limit = '\0';
+         for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
            ;
          ++p;
        }