Mercurial > octave
diff liboctave/util/lo-regexp.cc @ 22860:0b1e25cc4457
eliminate use of OCTAVE_QUIT macro in C++ sources
* __dsearchn__.cc, __magick_read__.cc, filter.cc, find.cc,
graphics.cc, quadcc.cc, qz.cc, tsearch.cc audiodevinfo.cc, symrcm.cc,
op-int.h, lo-regexp.cc: Use inline octave_quit function instead of
OCTAVE_QUIT macro.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 03 Dec 2016 07:12:10 -0500 |
parents | 3a2b891d0b33 |
children | ef4d915df748 |
line wrap: on
line diff
--- a/liboctave/util/lo-regexp.cc Fri Dec 02 13:49:53 2016 -0500 +++ b/liboctave/util/lo-regexp.cc Sat Dec 03 07:12:10 2016 -0500 @@ -270,7 +270,7 @@ while (true) { - OCTAVE_QUIT; + octave_quit (); int matches = pcre_exec (re, 0, buffer.c_str (), buffer.length (), idx, @@ -296,7 +296,7 @@ while (matches == PCRE_ERROR_MATCHLIMIT && i++ < PCRE_MATCHLIMIT_MAX) { - OCTAVE_QUIT; + octave_quit (); pe.match_limit *= 10; matches = pcre_exec (re, &pe, buffer.c_str (), @@ -511,7 +511,7 @@ regexp::match_data::const_iterator p = rx_lst.begin (); for (size_t i = 0; i < num_matches; i++) { - OCTAVE_QUIT; + octave_quit (); double start = p->start (); double end = p->end (); @@ -537,7 +537,7 @@ p = rx_lst.begin (); for (size_t i = 0; i < num_matches; i++) { - OCTAVE_QUIT; + octave_quit (); double start = p->start (); double end = p->end (); @@ -587,7 +587,8 @@ regexp::match_data::const_iterator p = rx_lst.begin (); for (size_t i = 0; i < num_matches; i++) { - OCTAVE_QUIT; + octave_quit (); + delta += static_cast<int> (replen) - static_cast<int> (p->end () - p->start () + 1); p++; @@ -599,7 +600,8 @@ p = rx_lst.begin (); for (size_t i = 0; i < num_matches; i++) { - OCTAVE_QUIT; + octave_quit (); + rep.append (&buffer[from], static_cast<size_t> (p->start () - 1) - from); from = static_cast<size_t> (p->end ());