/* input_scrub.c - Break up input buffers into whole numbers of lines.
- Copyright (C) 1987-2017 Free Software Foundation, Inc.
+ Copyright (C) 1987-2020 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
}
\f
+/* Return the current physical input file name and line number, if known */
+
+const char *
+as_where_physical (unsigned int *linep)
+{
+ if (physical_input_file != NULL)
+ {
+ if (linep != NULL)
+ *linep = physical_input_line;
+ return physical_input_file;
+ }
+
+ if (linep != NULL)
+ *linep = 0;
+ return NULL;
+}
+
/* Return the current file name and line number. */
const char *
*linep = logical_input_line;
return logical_input_file;
}
- else if (physical_input_file != NULL)
- {
- if (linep != NULL)
- *linep = physical_input_line;
- return physical_input_file;
- }
- else
- {
- if (linep != NULL)
- *linep = 0;
- return NULL;
- }
+
+ return as_where_physical (linep);
}
+