[asterisk-commits] russell: trunk r47493 - in /trunk: ./ main/term.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Nov 11 08:22:08 MST 2006
Author: russell
Date: Sat Nov 11 09:22:08 2006
New Revision: 47493
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47493
Log:
Merged revisions 47492 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r47492 | russell | 2006-11-11 10:18:02 -0500 (Sat, 11 Nov 2006) | 2 lines
Tweak the formatting of this new function to better conform to coding guidelines.
........
Modified:
trunk/ (props changed)
trunk/main/term.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/main/term.c
URL: http://svn.digium.com/view/asterisk/trunk/main/term.c?view=diff&rev=47493&r1=47492&r2=47493
==============================================================================
--- trunk/main/term.c (original)
+++ trunk/main/term.c Sat Nov 11 09:22:08 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