Added missing 'simple escape sequences'
git-svn-id: svn://svn.cc65.org/cc65/trunk@2891 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
9bf337a37b
commit
98e3d2815e
1 changed files with 16 additions and 11 deletions
|
@ -52,7 +52,7 @@
|
|||
|
||||
|
||||
|
||||
static char ParseChar (StrBuf* B)
|
||||
static int ParseChar (StrBuf* B)
|
||||
/* Parse a character. Converts \n into EOL, etc. */
|
||||
{
|
||||
unsigned I;
|
||||
|
@ -61,6 +61,9 @@ static char ParseChar (StrBuf* B)
|
|||
/* Check for escape chars */
|
||||
if ((C = SB_Get (B)) == '\\') {
|
||||
switch (SB_Get (B)) {
|
||||
case 'a':
|
||||
C = '\a';
|
||||
break;
|
||||
case 'b':
|
||||
C = '\b';
|
||||
break;
|
||||
|
@ -76,6 +79,9 @@ static char ParseChar (StrBuf* B)
|
|||
case 't':
|
||||
C = '\t';
|
||||
break;
|
||||
case 'v':
|
||||
C = '\v';
|
||||
break;
|
||||
case '\"':
|
||||
C = '\"';
|
||||
break;
|
||||
|
@ -85,6 +91,9 @@ static char ParseChar (StrBuf* B)
|
|||
case '\\':
|
||||
C = '\\';
|
||||
break;
|
||||
case '\?':
|
||||
C = '\?';
|
||||
break;
|
||||
case 'x':
|
||||
case 'X':
|
||||
/* Hex character constant */
|
||||
|
@ -116,10 +125,6 @@ Octal: I = 0;
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Code */
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Add table
Reference in a new issue