Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmstringparsetext(3) [centos man page]

XmStringParseText(library call) 										   XmStringParseText(library call)

NAME
XmStringParseText -- A function that converts a character string to a compound string SYNOPSIS
#include <Xm/Xm.h> XmString XmStringParseText( XtPointer text, XtPointer *text_end, XmStringTag tag, XmTextType type, XmParseTable parse_table, Cardinal parse_count, XtPointer call_data); DESCRIPTION
XmStringParseText converts characters specified in text to corresponding components in the returned compound string. The resulting compound string consists of at least one locale or charset tag component and a series of XmString text components and other components. The conver- sion proceeds according to the parse information contained in parse_table. See the Motif Programmer's Guide for more information about parsing and parse tables. o If type is XmCHARSET_TEXT, the associated tag is interpreted as a charset name. If tag has a value of NULL, a charset component whose value is the result of mapping XmFONTLIST_DEFAULT_TAG is created. o If type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, the associated tag is interpreted as a language environment name. If tag has a value of NULL, a locale component with a value of _MOTIF_DEFAULT_LOCALE is created. If type is XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT, tag must be NULL or _MOTIF_DEFAULT_LOCALE. XmStringParseText also scans the string for characters that have matches in parse_table. Whenever a match is found, the text up to that point is concatenated with the mapped component. text Specifies the NULL-terminated string containing characters of a type determined by type. This is updated to point to after the last character scanned. text_end Specifies a pointer into text. If a NULL is supplied to the text_end parameter, then XmStringParseText parses text until NULL is encountered, or until it reaches a point in text where it is directed to stop (for example, by a parse_proc). Otherwise, the value supplied to the text_end parameter is the pointer into text where parsing is to stop, and the returned character is the one where parsing did stop. tag Specifies the tag to be used in creating the result. The type of string tag created (charset or locale) depends on the text type and the passed in tag value. If the tag value is NULL and if type indicates that a charset string tag should be created, the string tag has the value that is the result of mapping XmFONTLIST_DEFAULT_TAG. If type indicates a locale string tag, the string tag has the value _MOTIF_DEFAULT_LOCALE. type Specifies the type of text and the tag type. If a locale tag should be created, type has a value of either XmMULTIBYTE_TEXT or XmWIDECHAR_TEXT. If type has value of XmCHARSET_TEXT, a charset tag will be created. parse_table Specifies the parse table to be used in scanning for characters to be converted to other compound string components. parse_count Specifies the number of entries in parse_table. call_data Specifies data to be passed to the parse procedures. RETURN
Returns a new compound string. The function allocates space to hold the returned compound string. When the application no longer needs the returned compound string, the application should call XmStringFree. RELATED
XmString(3), XmStringFree(3), XmParseTable(3), XmParseMapping(3). XmStringParseText(library call)

Check Out this Related Man Page

XmStringUnparse(library call)											     XmStringUnparse(library call)

NAME
XmStringUnparse -- A compound string function that unparses text SYNOPSIS
#include <Xm/Xm.h> XtPointer XmStringUnparse( XmString string, XmStringTag tag, XmTextType tag_type, XmTextType output_type, XmParseTable parse_table, Cardinal parse_count, XmParseModel parse_model); DESCRIPTION
XmStringUnparse looks in the input string for text segments that are tagged with locale or charset tags that match tag. The tag_type param- eter specifies whether the tag is a locale or charset type. If tag has a value of NULL, all the segments are matched. When a text segment is found with a matching tag, it is added to the end of a resulting string. The characters in the resulting string are of type output_type. XmStringUnparse also checks string for components that match components in parse_table, and also to see if the component matches the condi- tion specified by parse_model. If the string component matches in both checks, then the associated character is added to the end of the resulting string. string Specifies the XmString to be converted. tag Specifies the tag to be used in matching with text segments. Only text segments that match tag will be included in the resulting string. If tag has a value of NULL, all segments are considered as matches, and tag_type is ignored. tag_type Specifies the type of tag to be searched for, including XmMULTIBYTE_TEXT, XmWIDECHAR_TEXT, and XmCHARSET_TEXT. output_type Specifies the type of text to be returned in the string, including XmMULTIBYTE_TEXT, XmWIDECHAR_TEXT, and XmCHARSET_TEXT. parse_table Specifies the parse table to be used in scanning for compound string components to be converted to other characters. parse_count Specifies how many entries are in parse_table. parse_model Specifies which non-text components to be considered in matching in parse_table. These include: XmOUTPUT_ALL Puts out all matching components. XmOUTPUT_BETWEEN Puts out only those matching components that are between two matching text components. XmOUTPUT_BEGINNING Puts out only those matching components that are at the beginning of a matching text component. XmOUTPUT_END Puts out only those matching components that are at the end of a matching text component. XmOUTPUT_BOTH Puts out only those matching components that are at the beginning or end of a matching text component. RETURN
Returns a newly allocated string containing characters of a type determined by output_type. The application is responsible for managing this allocated space. The application can recover this allocated space by calling XtFree. RELATED
XmString(3), XmParseTable(3), XmParseMapping(3). XmStringUnparse(library call)
Man Page