projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e407192
)
Also escape double quotes for ECPG's #line statement.
author
Michael Meskes
Sat, 6 Jul 2013 20:08:53 +0000
(22:08 +0200)
committer
Michael Meskes
Sat, 6 Jul 2013 20:11:14 +0000
(22:11 +0200)
src/interfaces/ecpg/preproc/output.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/preproc/output.c
b/src/interfaces/ecpg/preproc/output.c
index 616e8f040086684e97746bf6b0aa71873ae835fb..007c07c0342073aec68e8d7188616d91e69be4f9 100644
(file)
--- a/
src/interfaces/ecpg/preproc/output.c
+++ b/
src/interfaces/ecpg/preproc/output.c
@@
-95,7
+95,7
@@
hashline_number(void)
#endif
)
{
- /* "* 2" here is for escaping
\s
below */
+ /* "* 2" here is for escaping
'\' and '"'
below */
char *line = mm_alloc(strlen("\n#line %d \"%s\"\n") + sizeof(int) * CHAR_BIT * 10 / 3 + strlen(input_filename) * 2);
char *src,
*dest;
@@
-105,7
+105,7
@@
hashline_number(void)
dest = line + strlen(line);
while (*src)
{
- if (*src == '\\')
+ if (*src == '\\'
|| *src == '"'
)
*dest++ = '\\';
*dest++ = *src++;
}