XmeGetNextCharacter — A compound string parse procedure to insert a character
#include <Xm/XmP.h>
XmIncludeStatus XmeGetNextCharacter
(text_in_out, text_end, type, tag, entry, pattern_length, str_include, call_data);XmeGetNextCharacter is a compound string parse procedure (a function of type XmParseProc). It is suitable for use as an XmNinvokeParseProc procedure in an XmParseMapping data structure.
XmeGetNextCharacter causes the character following the pattern characters to be used as output to the compound string under construction. The function assumes that text_in_out points to the first byte of the first character in the matched pattern. It creates a compound string consisting of a component that contains the next character following the matching characters. It sets text_in_out to a pointer to the first byte following the character parsed.
text_in_out | Specifies the text being parsed. The value is a pointer to the first byte of text matching the pattern that triggered the call to the parse procedure. When the parse procedure returns, this argument is set to the position in the text where parsing should resume; that is, to the byte following the character parsed by the parse procedure. | |
text_end | Specifies a pointer to the end of the text_in_out string. If text_end is NULL, the string is scanned until a NULL character is found. Otherwise, the string is scanned up to, but not including, the character whose address is text_end. | |
type | Specifies the type of text and the type of compound string component the function creates. If type is XmCHARSET_TEXT and tag is other than XmFONTLIST_DEFAULT_TAG, the function creates a component of type XmSTRING_COMPONENT_TEXT. If type is XmCHARSET_TEXT and tag is XmFONTLIST_DEFAULT_TAG, or if type is XmMULTIBYTE_TEXT, the function creates a component of type XmSTRING_COMPONENT_LOCALE_TEXT. If type is XmWIDECHAR_TEXT, the function creates a component of type XmSTRING_COMPONENT_WIDECHAR_TEXT. | |
tag | Specifies the tag to be used along with a type of XmCHARSET_TEXT in determining the type of compound string component the function creates. | |
entry | Specifies the parse mapping that triggered the call to the parse procedure. | |
pattern_length | Specifies the number of bytes in the input text, following text_in_out, that constitute the matched pattern. | |
str_include | Specifies a pointer to a compound string. The parse procedure creates a compound string to be included in the compound string being constructed. The parse procedure then returns the compound string in this argument. | |
call_data | Specifies data passed by the application to the parsing routine. |
This function returns XmINSERT, indicating that the parsing routine should concatenate the result to the compound string being constructed and continue parsing.
XmParseMapping(3), XmParseTable(3), XmString(3), and XmeGetDirection(3).