for (p = main_input_filename; *p; p++) \
if (*p == '/') \
after_dir = p + 1; \
- fprintf (FILE, "\t.file \"%s\"\n", after_dir); \
+ fprintf (FILE, "\t.file "); \
+ output_quoted_string (FILE, after_dir); \
+ fprintf (FILE, "\n"); \
fprintf (FILE, "\t.sect .lit,lit\n"); }
/* Output to assembler file text saying following lines
for (p = main_input_filename; *p; p++) \
if (*p == '/') \
after_dir = p + 1; \
- fprintf (FILE, "\t.file \"%s\"\n", after_dir); \
+ fprintf (FILE, "\t.file "); \
+ output_quoted_string (FILE, after_dir); \
+ fprintf (FILE, "\n"); \
if (flag_shared_data) \
fprintf (FILE, "\t.sect .shdata,data\n"); \
fprintf (FILE, "\t.sect .lit,lit\n"); }
for (p = main_input_filename; *p; p++) \
if (*p == '/') \
after_dir = p + 1; \
- fprintf (FILE, "\n\t.file 2 \"%s\"\n", after_dir); \
+ fprintf (FILE, "\n\t.file 2 "); \
+ output_quoted_string (FILE, after_dir); \
+ fprintf (FILE, "\n"); \
}
/* Output to assembler file text saying following lines
#undef ASM_FILE_START
#define ASM_FILE_START(FILE) \
- do { fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name); \
+ do { fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, dump_base_name); \
+ fprintf (FILE, "\n"); \
if (optimize) \
ASM_FILE_START_1 (FILE); \
else \
??? I am skeptical of this -- RMS. */
#define ASM_FILE_START(FILE) \
- fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name);
+ do { fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, dump_base_name); \
+ fprintf (FILE, "\n"); \
+ } while (0)
/* This was suggested, but it shouldn't be right for DBX output. -- RMS
#define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
fprintf ((FILE), "\t.align 2,0x90\n"); /* Use log of 4 as arg. */
\f
#undef ASM_FILE_START
-/* ASM_FILE_START(FILE) used to be defined as:
- fprintf (FILE, "\t.file\t\"%s\"\n", dump_base_name);
- However, the string dump_base_name may contain backslashes. (This may often
- be the case when gcc is run under operating systems such as DOS and OS/2.)
- Each backslash in dump_base_name must be converted to two consecutive
- backslashes on output. */
#define ASM_FILE_START(FILE) \
- { char *p; \
- fprintf (FILE, "\t.file\t\""); \
- for (p = dump_base_name; *p != '\0'; p++) \
- if (*p == '\\') fprintf (FILE, "\\\\"); \
- else fprintf (FILE, "%c", *p); \
- fprintf (FILE, "\"\n"); }
+ do { fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, dump_base_name); \
+ fprintf (FILE, "\n"); \
+ } while (0)
/* A C statement or statements which output an assembler instruction
opcode to the stdio stream STREAM. The macro-operand PTR is a
} \
strncpy (shorter, na, 14); \
shorter[14] = 0; \
- fprintf (FILE, "\t.file\t\"%s\"\n", shorter); \
+ fprintf (FILE, "\t.file\t"); \
+ output_quoted_string (FILE, shorter); \
+ fprintf (FILE, "\n"); \
} \
fprintf (FILE, "\t.version\t\"%s %s\"\n", \
language_string, version_string); \