summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-01-23 23:12:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-01-23 23:12:48 (GMT)
commitd7f662a72044437b0a6a5830892b87abe6840b16 (patch)
tree463c9051a05f88f28c04a1ef2f8601616fe9f61b /generic/tclUtil.c
parent967e3660b0c1c785d2f0faf58233c05fba58e34f (diff)
parentd007f17bcd05bca0bcceafe9a712b0a1b3b3f020 (diff)
downloadtcl-d7f662a72044437b0a6a5830892b87abe6840b16.zip
tcl-d7f662a72044437b0a6a5830892b87abe6840b16.tar.gz
tcl-d7f662a72044437b0a6a5830892b87abe6840b16.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 7060b1d..9ec9c99 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -14,6 +14,7 @@
#include "tclInt.h"
#include "tclParse.h"
+#include "tclStringTrim.h"
#include <math.h>
/*
@@ -1719,8 +1720,7 @@ TclTrimLeft(
*/
/* The whitespace characters trimmed during [concat] operations */
-#define CONCAT_WS " \f\v\r\t\n"
-#define CONCAT_WS_SIZE (int) (sizeof(CONCAT_WS "") - 1)
+#define CONCAT_WS_SIZE (int) (sizeof(CONCAT_TRIM_SET "") - 1)
char *
Tcl_Concat(
@@ -1776,7 +1776,8 @@ Tcl_Concat(
* Trim away the leading whitespace.
*/
- trim = TclTrimLeft(element, elemLength, CONCAT_WS, CONCAT_WS_SIZE);
+ trim = TclTrimLeft(element, elemLength, CONCAT_TRIM_SET,
+ CONCAT_WS_SIZE);
element += trim;
elemLength -= trim;
@@ -1785,7 +1786,8 @@ Tcl_Concat(
* a final backslash character.
*/
- trim = TclTrimRight(element, elemLength, CONCAT_WS, CONCAT_WS_SIZE);
+ trim = TclTrimRight(element, elemLength, CONCAT_TRIM_SET,
+ CONCAT_WS_SIZE);
trim -= trim && (element[elemLength - trim - 1] == '\\');
elemLength -= trim;
@@ -1910,7 +1912,8 @@ Tcl_ConcatObj(
* Trim away the leading whitespace.
*/
- trim = TclTrimLeft(element, elemLength, CONCAT_WS, CONCAT_WS_SIZE);
+ trim = TclTrimLeft(element, elemLength, CONCAT_TRIM_SET,
+ CONCAT_WS_SIZE);
element += trim;
elemLength -= trim;
@@ -1919,7 +1922,8 @@ Tcl_ConcatObj(
* a final backslash character.
*/
- trim = TclTrimRight(element, elemLength, CONCAT_WS, CONCAT_WS_SIZE);
+ trim = TclTrimRight(element, elemLength, CONCAT_TRIM_SET,
+ CONCAT_WS_SIZE);
trim -= trim && (element[elemLength - trim - 1] == '\\');
elemLength -= trim;