[svn-commits] mogorman: branch anthonyl/escape-filter2 r47487 - /team/anthonyl/escape-filte...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Nov 10 17:13:04 MST 2006


Author: mogorman
Date: Fri Nov 10 18:13:04 2006
New Revision: 47487

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47487
Log:
slight clean up.

Modified:
    team/anthonyl/escape-filter2/main/term.c

Modified: team/anthonyl/escape-filter2/main/term.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/escape-filter2/main/term.c?view=diff&rev=47487&r1=47486&r2=47487
==============================================================================
--- team/anthonyl/escape-filter2/main/term.c (original)
+++ team/anthonyl/escape-filter2/main/term.c Fri Nov 10 18:13:04 2006
@@ -268,31 +268,28 @@
 /* filter escape sequences */
 void term_filter_escapes(char *line)
  {
-	 int i  = 0;
+	 int i;
    
-	 for (i=0;i<strlen(line);i++) {
+	 for (i=0; i < strlen(line); i++) {
 		 if (line[i] == ESC) {					 
-			 if ( line[i+1] == '\x5b') {
+			 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] = '\x20';
-					 break;
+				 	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] = '\x20';
+				 line[i] = ' ';
 			 }
 		 } 
 	 }
-	 
-	 return;
  }
 
 char *term_prep(void)



More information about the svn-commits mailing list