quote: be consistent in not using C escapes for bytes

We used numbers in nasm_unquote and C escapes in nasm_quote - use
numbers in both places, just in case some C compiler does something
weird with '\r' and (especially) '\n'.
This commit is contained in:
H. Peter Anvin 2008-06-02 10:38:54 -07:00
parent e46fec66ca
commit 2dff954903

14
quote.c
View File

@ -90,31 +90,31 @@ char *nasm_quote(char *str, size_t len)
*q++ = '\\';
*q++ = c;
break;
case '\a':
case 7:
*q++ = '\\';
*q++ = 'a';
break;
case '\b':
case 8:
*q++ = '\\';
*q++ = 'b';
break;
case '\t':
case 9:
*q++ = '\\';
*q++ = 't';
break;
case '\n':
case 10:
*q++ = '\\';
*q++ = 'n';
break;
case '\v':
case 11:
*q++ = '\\';
*q++ = 'v';
break;
case '\f':
case 12:
*q++ = '\\';
*q++ = 'f';
break;
case '\r':
case 13:
*q++ = '\\';
*q++ = 'r';
break;