[asterisk-commits] russell: branch 1.4 r47492 -
/branches/1.4/main/term.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Nov 11 08:18:02 MST 2006
Author: russell
Date: Sat Nov 11 09:18:02 2006
New Revision: 47492
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47492
Log:
Tweak the formatting of this new function to better conform to coding guidelines.
Modified:
branches/1.4/main/term.c
Modified: branches/1.4/main/term.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/term.c?view=diff&rev=47492&r1=47491&r2=47492
==============================================================================
--- branches/1.4/main/term.c (original)
+++ branches/1.4/main/term.c Sat Nov 11 09:18:02 2006
@@ -264,31 +264,28 @@
return outbuf;
}
-
/* filter escape sequences */
void term_filter_escapes(char *line)
{
int i;
- for (i=0; i < strlen(line); i++) {
- if (line[i] == ESC) {
- if (line[i+1] == '\x5b') {
- switch (line[i+2]) {
- case '\x30':
- break;
- case '\x31':
- break;
- case '\x33':
- break;
- default:
- /* replace ESC with a space */
- line[i] = ' ';
- }
- } else {
- /* replace ESC with a space */
- line[i] = ' ';
- }
- }
+ for (i = 0; i < strlen(line); i++) {
+ if (line[i] != ESC)
+ continue;
+ if (line[i + 1] == '\x5b') {
+ switch (line[i + 2]) {
+ case '\x30':
+ case '\x31':
+ case '\x33':
+ break;
+ default:
+ /* replace ESC with a space */
+ line[i] = ' ';
+ }
+ } else {
+ /* replace ESC with a space */
+ line[i] = ' ';
+ }
}
}
More information about the asterisk-commits
mailing list