summaryrefslogtreecommitdiffstats
path: root/generic/tclRegexp.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-11-18 10:29:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-11-18 10:29:41 (GMT)
commitb2a63152cbf72e7a23e9870d94bbf551373ef84b (patch)
tree7edbe522c18e704c6481c96aaa17f1163c688ca7 /generic/tclRegexp.c
parentf1dbfbf21581370d5dad9cbeb4c8ac09f93fb30c (diff)
downloadtcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.zip
tcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.tar.gz
tcl-b2a63152cbf72e7a23e9870d94bbf551373ef84b.tar.bz2
Now that we have TCL_AUTO_LENGTH/TCL_IO_FAILURE macro's, use them to make code and documentation more readable.
Shifted to feature branch as a temporary measure since it doesn't build.
Diffstat (limited to 'generic/tclRegexp.c')
-rw-r--r--generic/tclRegexp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index 71f6581..fa4f2fa 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -71,7 +71,7 @@ typedef struct {
* expression patterns. NULL means that this
* slot isn't used. Malloc-ed. */
size_t patLengths[NUM_REGEXPS];/* Number of non-null characters in
- * corresponding entry in patterns. (size_t)-1 means
+ * corresponding entry in patterns. -1 means
* entry isn't used. */
struct TclRegexp *regexps[NUM_REGEXPS];
/* Compiled forms of above strings. Also
@@ -306,7 +306,7 @@ RegExpExecUniChar(
size_t numChars, /* Length of Tcl_UniChar string. */
size_t nm, /* How many subexpression matches (counting
* the whole match as subexpression 0) are of
- * interest. (size_t)-1 means "don't know". */
+ * interest. -1 means "don't know". */
int flags) /* Regular expression flags. */
{
int status;
@@ -363,7 +363,7 @@ TclRegExpRangeUniChar(
* passed to Tcl_RegExpExec. */
size_t index, /* 0 means give the range of the entire match,
* > 0 means give the range of a matching
- * subrange, (size_t)-1 means the range of the
+ * subrange, -1 means the range of the
* rm_extend field. */
int *startPtr, /* Store address of first character in
* (sub-)range here. */
@@ -372,7 +372,7 @@ TclRegExpRangeUniChar(
{
TclRegexp *regexpPtr = (TclRegexp *) re;
- if ((regexpPtr->flags&REG_EXPECT) && index == (size_t)-1) {
+ if ((regexpPtr->flags&REG_EXPECT) && index == TCL_AUTO_LENGTH) {
*startPtr = regexpPtr->details.rm_extend.rm_so;
*endPtr = regexpPtr->details.rm_extend.rm_eo;
} else if (index > regexpPtr->re.re_nsub) {
@@ -445,7 +445,7 @@ Tcl_RegExpExecObj(
* should begin. */
size_t nmatches, /* How many subexpression matches (counting
* the whole match as subexpression 0) are of
- * interest. (size_t)-1 means all of them. */
+ * interest. -1 means all of them. */
int flags) /* Regular expression execution flags. */
{
TclRegexp *regexpPtr = (TclRegexp *) re;