You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
2.0 KiB

Sun Jan 28 21:08:45 EET 2007 Ville Laurikari <vl@iki.fi>
* Fixed regoff_t documentation for wide characters.
The documentation erroneously claimed that offsets are always given in
bytes (they are bytes in byte and multibyte strings, but wchar_t
offsets in wchar_t strings).
Thanks to Gregory Sharp for pointing this out.
diff -rN -u old-stable/doc/tre-api.html new-stable/doc/tre-api.html
--- old-stable/doc/tre-api.html 2007-11-04 20:25:00.000000000 +0200
+++ new-stable/doc/tre-api.html 2007-11-04 20:25:00.000000000 +0200
@@ -323,22 +323,21 @@
<dl>
<dt><tt><font class="type">regoff_t</font> <font
class="arg">rm_so</font></tt></dt>
-<dd>Byte offset from start of <tt><font class="arg">string</font></tt>
-to start of substring. </dd>
+<dd>Offset from start of <tt><font class="arg">string</font></tt> to start of
+substring. </dd>
<dt><tt><font class="type">regoff_t</font> <font
class="arg">rm_eo</font></tt></dt>
-<dd>Byte offset from start of <tt><font class="arg">string</font></tt>
-to the first character after the substring. </dd>
+<dd>Offset from start of <tt><font class="arg">string</font></tt> to the first
+character after the substring. </dd>
</dl>
</blockquote>
<p>
-The length of a submatch in bytes can be computed by subtracting
-<code>rm_eo</code> and <code>rm_so</code>.
-If a parenthesized subexpression did not participate in a match, the
-<code>rm_so</code> and <code>rm_eo</code> fields for the corresponding
-<code>pmatch</code> element are set to <code>-1</code>.
-When a multibyte character set is in effect, the submatch offsets are
+The length of a submatch can be computed by subtracting <code>rm_eo</code> and
+<code>rm_so</code>. If a parenthesized subexpression did not participate in a
+match, the <code>rm_so</code> and <code>rm_eo</code> fields for the
+corresponding <code>pmatch</code> element are set to <code>-1</code>. Note
+that when a multibyte character set is in effect, the submatch offsets are
given as byte offsets, not character offsets.
</p>