Fix assorted ChangeLog errors
[external/binutils.git] / gas / app.c
index 372b9b6..67402e2 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -1,7 +1,5 @@
 /* This is the Assembler Pre-Processor
-   Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1987-2015 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -160,7 +158,10 @@ do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
   for (p = line_comment_chars; *p; p++)
     lex[(unsigned char) *p] = LEX_IS_LINE_COMMENT_START;
 
-  for (p = line_separator_chars; *p; p++)
+#ifndef tc_line_separator_chars
+#define tc_line_separator_chars line_separator_chars
+#endif
+  for (p = tc_line_separator_chars; *p; p++)
     lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
 
 #ifdef tc_parallel_separator_chars
@@ -246,7 +247,7 @@ struct app_save
 char *
 app_push (void)
 {
-  register struct app_save *saved;
+  struct app_save *saved;
 
   saved = (struct app_save *) xmalloc (sizeof (*saved));
   saved->state = state;
@@ -283,7 +284,7 @@ app_push (void)
 void
 app_pop (char *arg)
 {
-  register struct app_save *saved = (struct app_save *) arg;
+  struct app_save *saved = (struct app_save *) arg;
 
   /* There is no do_scrub_end ().  */
   state = saved->state;
@@ -359,7 +360,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
   char *from;
   char *fromend;
   size_t fromlen;
-  register int ch, ch2 = 0;
+  int ch, ch2 = 0;
   /* Character that started the string we're working on.  */
   static char quotechar;
 
@@ -684,7 +685,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
        case 16:
          /* We have seen an 'a' at the start of a symbol, look for an 'f'.  */
          ch = GET ();
-         if (ch == 'f' || ch == 'F') 
+         if (ch == 'f' || ch == 'F')
            {
              state = 17;
              PUT (ch);
@@ -1217,9 +1218,16 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
                  while (ch != EOF && !IS_NEWLINE (ch))
                    ch = GET ();
                  if (ch == EOF)
-                   as_warn (_("end of file in comment; newline inserted"));
+                   {
+                     as_warn (_("end of file in comment; newline inserted"));
+                     PUT ('\n');
+                   }
+                 else /* IS_NEWLINE (ch) */
+                   {
+                     /* To process non-zero add_newlines.  */
+                     UNGET (ch);
+                   }
                  state = 0;
-                 PUT ('\n');
                  break;
                }
              /* Looks like `# 123 "filename"' from cpp.  */
@@ -1330,12 +1338,12 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
 
 #ifdef TC_Z80
          /* "af'" is a symbol containing '\''.  */
-         if (state == 3 && (ch == 'a' || ch == 'A')) 
+         if (state == 3 && (ch == 'a' || ch == 'A'))
            {
              state = 16;
              PUT (ch);
              ch = GET ();
-             if (ch == 'f' || ch == 'F') 
+             if (ch == 'f' || ch == 'F')
                {
                  state = 17;
                  PUT (ch);