Skip to content
Snippets Groups Projects
Commit 4a0d83d7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Expand ^A/ (conditional new-line) to CRLF

parent 22f1c81e
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,9 @@ int main(int argc, char **argv)
case ']':
fputc('\n',out);
break;
case '/': // Conditional new-line
fprintf(out,"\r\n");
break;
case 'J':
ANSI;
fprintf(out,"J"); /* clear to EOS */
......
......@@ -48,6 +48,10 @@ char* remove_ctrl_a(const char *str, char *dest)
/* convert non-destructive backspace to a destructive backspace */
if(str[i]=='<' && j)
j--;
else if(str[i] == '/') { // Conditional new-line
dest[j++] = '\r';
dest[j++] = '\n';
}
}
else dest[j++]=str[i];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment