mtext_prop_range(3m17n)

mtext_prop_range3m17n

Usage

int mtext_prop_range (MText * mt, MSymbol key, int pos, int * from, int * to, int deeper)

Overview

Find the range where the value of a text property is the same. The mtext_prop_range() function investigates the extent where all characters have the same value for a text property. It first finds the value of the property specified by key of the character at pos in M-text mt. Then it checks if adjacent characters have the same value for the property key. The beginning and the end of the found range are stored to the variable pointed to by from and to. The character position stored in from is inclusive but that in to is exclusive; this fashion is compatible with the range specification in the mtext_put_prop() function, etc.

If deeper is not 0, not only the topmost but also all the stacked properties whose key is key are compared.

If from is NULL, the beginning of range is not searched for. If to is NULL, the end of range is not searched for.

Return value

If the operation was successful, mtext_prop_range() returns the number of values the property key has at pos. Otherwise it returns -1 and assigns an error code to the external variable merror_code.

Errors

MERROR_RANGE, MERROR_SYMBOL

Releases

8 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 7–12
  3. 13

From m17n-docs 1.8.4-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.