summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 812bcad..74ab749 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -952,7 +952,7 @@ Tcl_ScanElement(
* This function is a companion function to Tcl_ConvertCountedElement. It
* scans a string to see what needs to be done to it (e.g. add
* backslashes or enclosing braces) to make the string into a valid Tcl
- * list element. If length is (size_t)-1, then the string is scanned from src up
+ * list element. If length is -1, then the string is scanned from src up
* to the first null byte.
*
* Results:
@@ -970,7 +970,7 @@ Tcl_ScanElement(
size_t
Tcl_ScanCountedElement(
const char *src, /* String to convert to Tcl list element. */
- size_t length, /* Number of bytes in src, or (size_t)-1. */
+ size_t length, /* Number of bytes in src, or -1. */
int *flagPtr) /* Where to store information to guide
* Tcl_ConvertElement. */
{
@@ -1035,7 +1035,7 @@ TclScanElement(
int braceCount = 0; /* Count of all braces '{' '}' seen. */
#endif /* COMPAT */
- if ((p == NULL) || (length == 0) || ((*p == '\0') && (length == (size_t)-1))) {
+ if ((p == NULL) || (length == 0) || ((*p == '\0') && (length == TCL_AUTO_LENGTH))) {
/*
* Empty string element must be brace quoted.
*/
@@ -1124,7 +1124,7 @@ TclScanElement(
break;
case '\\': /* TYPE_SUBS */
extra++; /* Escape '\' => '\\' */
- if ((length == 1) || ((length == (size_t)-1) && (p[1] == '\0'))) {
+ if ((length == 1) || ((length == TCL_AUTO_LENGTH) && (p[1] == '\0'))) {
/*
* Final backslash. Cannot format with brace quoting.
*/
@@ -1155,7 +1155,7 @@ TclScanElement(
#endif /* COMPAT */
break;
case '\0': /* TYPE_SUBS */
- if (length == (size_t)-1) {
+ if (length == TCL_AUTO_LENGTH) {
goto endOfString;
}
/* TODO: Panic on improper encoding? */
@@ -1427,7 +1427,7 @@ TclConvertElement(
*/
if (conversion == CONVERT_NONE) {
- if (length == (size_t)-1) {
+ if (length == TCL_AUTO_LENGTH) {
/* TODO: INT_MAX overflow? */
while (*src) {
*p++ = *src++;
@@ -1446,7 +1446,7 @@ TclConvertElement(
if (conversion == CONVERT_BRACE) {
*p = '{';
p++;
- if (length == (size_t)-1) {
+ if (length == TCL_AUTO_LENGTH) {
/* TODO: INT_MAX overflow? */
while (*src) {
*p++ = *src++;
@@ -1519,7 +1519,7 @@ TclConvertElement(
p++;
continue;
case '\0':
- if (length == (size_t)-1) {
+ if (length == TCL_AUTO_LENGTH) {
return (size_t)(p - dst);
}