Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
8b7bdd15
Commit
8b7bdd15
authored
Oct 27, 2011
by
Christoph Mallon
Browse files
Dump special characters in string intializers properly, e.g. tab as \t.
Newer yComp (>= 1.3.14) can handle backslashes in strings.
parent
8e095cdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irdumptxt.c
View file @
8b7bdd15
...
@@ -384,14 +384,14 @@ static void dump_ir_initializers_to_file(FILE *F, const char *prefix,
...
@@ -384,14 +384,14 @@ static void dump_ir_initializers_to_file(FILE *F, const char *prefix,
long
const
v
=
get_tarval_long
(
tv
);
long
const
v
=
get_tarval_long
(
tv
);
switch
(
v
)
{
switch
(
v
)
{
case
0x00
:
fprintf
(
F
,
"
<NUL>"
);
break
;
case
0x00
:
fprintf
(
F
,
"
\\\\
000"
);
break
;
case
0x09
:
fprintf
(
F
,
"
<HT>"
);
break
;
case
0x09
:
fprintf
(
F
,
"
\\\\
t"
);
break
;
case
0x0A
:
fprintf
(
F
,
"
<NL>"
);
break
;
case
0x0A
:
fprintf
(
F
,
"
\\\\
n"
);
break
;
case
0x0C
:
fprintf
(
F
,
"
<FF>"
);
break
;
case
0x0C
:
fprintf
(
F
,
"
\\\\
f"
);
break
;
case
0x0D
:
fprintf
(
F
,
"
<CR>"
);
break
;
case
0x0D
:
fprintf
(
F
,
"
\\\\
r"
);
break
;
case
0x1B
:
fprintf
(
F
,
"
<ESC>"
);
break
;
case
0x1B
:
fprintf
(
F
,
"
\\\\
033"
);
break
;
case
0x22
:
fprintf
(
F
,
"
<QUOTE>"
);
break
;
case
0x22
:
fprintf
(
F
,
"
\\\\\\\"
"
);
break
;
case
0x5C
:
fprintf
(
F
,
"
<BACKSLASH>
"
);
break
;
case
0x5C
:
fprintf
(
F
,
"
\\\\\\\\
"
);
break
;
default:
fprintf
(
F
,
"%c"
,
(
unsigned
char
)
v
);
break
;
default:
fprintf
(
F
,
"%c"
,
(
unsigned
char
)
v
);
break
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment