You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
/* Set of subroutines to (ultimately) return the next character to the
various matching subroutines. This file's job is to read files and
}
while (c != '\n');
+ /* Avoid truncation warnings for comment ending lines. */
+ gfc_current_locus.lb->truncated = 0;
+
goto done;
}
c = next_char ();
}
while (c != '\n');
+
+ /* Avoid truncation warnings for comment ending lines. */
+ gfc_current_locus.lb->truncated = 0;
}
if (c != '\n')
if (c == delim)
break;
if (c == '\n')
- goto done;
+ return;
if (c == '\\')
{
c = next_char ();
if (c == '\n')
- goto done;
+ return;
}
}
if (gfc_at_eof ())
break;
}
-
-done:
- if (c == '\n')
- gfc_advance_line ();
}
need be.
In fixed mode, we expand a tab that occurs within the statement
label region to expand to spaces that leave the next character in
- the source region. */
+ the source region.
+ load_line returns wether the line was truncated. */
-static void
-load_line (FILE * input, char **pbuf, char *filename, int linenum)
+static int
+load_line (FILE * input, char **pbuf)
{
- int c, maxlen, i, trunc_flag, preprocessor_flag;
+ int c, maxlen, i, preprocessor_flag;
+ int trunc_flag = 0;
static int buflen = 0;
char *buffer;
else if (i >= buflen)
{
/* Truncate the rest of the line. */
- trunc_flag = 1;
-
for (;;)
{
c = fgetc (input);
if (c == '\n' || c == EOF)
break;
- if (gfc_option.warn_line_truncation
- && trunc_flag
- && !gfc_is_whitespace (c))
- {
- gfc_warning_now ("%s:%d: Line is being truncated",
- filename, linenum);
- trunc_flag = 0;
- }
+ trunc_flag = 1;
}
ungetc ('\n', input);
*buffer++ = ' ';
*buffer = '\0';
+
+ return trunc_flag;
}
for (;;)
{
- load_line (input, &line, filename, current_file->line);
+ int trunc = load_line (input, &line);
len = strlen (line);
if (feof (input) && len == 0)
b->linenum = current_file->line++;
#endif
b->file = current_file;
+ b->truncated = trunc;
strcpy (b->line, line);
if (line_head == NULL)