mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-25 23:49:25 +00:00
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:
parent
85f0c32ff4
commit
ceabdfb4a0
14
src/input.c
14
src/input.c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user