removed \e from sourcecode and testcases

This commit is contained in:
prozessorkern
2020-02-03 20:45:19 +01:00
parent ea3c90f305
commit 34ec2d9b45
9 changed files with 16 additions and 16 deletions

View File

@@ -403,7 +403,7 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
utils_removeChars(inst, 1u, false);
}
/** -# check for start of escape sequence */
else if('\e' == *data)
else if('\x1b' == *data)
{
inst->escapeCounter = 1u;
}

View File

@@ -91,7 +91,7 @@ uint32_t utils_shellItoa(int32_t value, char *buffer, uint32_t base)
*/
void utils_saveCursorPos(shellmatta_instance_t *inst)
{
utils_writeEcho(inst, "\e[s", 3u);
utils_writeEcho(inst, "\x1b[s", 3u);
}
/**
@@ -100,7 +100,7 @@ void utils_saveCursorPos(shellmatta_instance_t *inst)
*/
void utils_restoreCursorPos(shellmatta_instance_t *inst)
{
utils_writeEcho(inst, "\e[u", 3u);
utils_writeEcho(inst, "\x1b[u", 3u);
}
/**
@@ -110,7 +110,7 @@ void utils_restoreCursorPos(shellmatta_instance_t *inst)
*/
void utils_eraseLine(shellmatta_instance_t *inst)
{
utils_writeEcho(inst, "\e[K", 3u);
utils_writeEcho(inst, "\x1b[K", 3u);
}
/**
@@ -126,7 +126,7 @@ void utils_rewindCursor(shellmatta_instance_t *inst, uint32_t length)
length = SHELLMATTA_MIN (length, inst->cursor);
if(length > 0u)
{
terminalCmd[0] = '\e';
terminalCmd[0] = '\x1b';
terminalCmd[1] = '[';
size = 2u + utils_shellItoa(length, &terminalCmd[2], 10);
terminalCmd[size] = 'D';
@@ -148,7 +148,7 @@ void utils_forwardCursor(shellmatta_instance_t *inst, uint32_t length)
length = SHELLMATTA_MIN (length, (inst->inputCount - inst->cursor));
if (length > 0u)
{
terminalCmd[0] = '\e';
terminalCmd[0] = '\x1b';
terminalCmd[1] = '[';
size = 2u + utils_shellItoa(length, &terminalCmd[2], 10);
terminalCmd[size] = 'C';