[asterisk-commits] eliel: branch group/appdocsxml r145323 - /team/group/appdocsxml/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 1 06:43:29 CDT 2008


Author: eliel
Date: Wed Oct  1 06:43:28 2008
New Revision: 145323

URL: http://svn.digium.com/view/asterisk?view=rev&rev=145323
Log:
Fix a string wrap function issue (avoid printing a '\n' if we are near a '\n' and
also fix the counting mechanism).

Modified:
    team/group/appdocsxml/main/pbx.c

Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=145323&r1=145322&r2=145323
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Wed Oct  1 06:43:28 2008
@@ -2949,6 +2949,7 @@
 					tmp[tmplen++] = postbr[i];
 				}
 				needtobreak = 0;
+				count = 1;
 			} else if (*in != '\n') {
 				needtobreak = 1;
 				t = in;
@@ -2956,7 +2957,7 @@
 				while (*t && sep > 0) {
 					t++;
 					/* Wait for the next space? */
-					if (*t == ' ') {
+					if (*t == ' ' || *t == '\n') {
 						break;
 					} else if (*t == ESC) {
 						/* bypass escape sequences. */
@@ -2972,7 +2973,7 @@
 					sep = (maxdiff % tmplen);
 					while (sep > 0) {
 						t--;
-						if (*t == ' ') {
+						if (*t == ' ' || *t == '\n') {
 							break;
 						} else if (*t == 'm') { /* XXX: Possible ESC don't continue */
 							sep = 0;
@@ -2994,6 +2995,7 @@
 						tmp[tmplen++] = postbr[i];
 					}
 					needtobreak = 0;
+					count = 1;
 				}
 
 			}




More information about the asterisk-commits mailing list