added backslash sequences \0, \t, \n and \r

git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@247 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
marcobaye 2020-06-21 15:21:27 +00:00
parent 85f0c32ff4
commit ceabdfb4a0

View File

@ -402,7 +402,19 @@ int Input_unescape_dynabuf(int read_index)
case '\'':
case '"':
break;
// TODO - convert '0' to 0, 'n' to 10, 'a' to BEL, etc.
case '0': // NUL
byte = 0;
break;
case 't': // TAB
byte = 9;
break;
case 'n': // LF
byte = 10;
break;
case 'r': // CR
byte = 13;
break;
// TODO - 'a' to BEL? others?
default:
Throw_error("Unsupported backslash sequence."); // TODO - add to docs
}