U_TEXT

Load and modify text library entries

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall U_TEXT(channel, facility, message#, text, [length], [no_shortcuts][, parameter, ...])

channel

The channel on which the text library is opened. (n)

facility

The desired facility name. (a)

message#

The number of the desired message. (n)

text

Returned with the message text. (a)

length

(optional) Returned with the length of the message text. (n)

no_shortcuts

(optional) The true/false flag that tells U_TEXT whether to prohibit shortcut text mapping. (n)

parameter

(optional) One or more (up to 10) S_BLD parameters. (a or n)

U_TEXT retrieves a text entry from a text message file, optionally performs an S_BLD on it, and optionally replaces menu entry names with their shortcut text. (Note that the S_BLD occurs before the entry name replacement.)

If no parameters are passed, Toolkit will not perform an S_BLD. This avoids errors which might occur if a “%” is in the text.

If no_shortcuts is passed and true, then no mapping of entry names to shortcut text will occur. Otherwise, M_RPLENT is called with the text after any S_BLD.

If length is passed, it is returned with the trimmed length of the resulting text. The text is returned in text.

Text message libraries may be created and maintained by using the Synergy UI Toolkit Control Panel (synctl).

The following example reads the text library which is open on the channel mylib, looking for a text message with facility “GEN” and a message number defined by D_EXITINFO. The text of the message is scanned for any entry names, and if they are found they are replaced by their corresponding shortcut text. The resulting text message is returned in info, and its trimmed length is returned in infolen.

xcall u_text(mylib, "GEN", D_EXITINFO, info, infolen) 

In the second example, the text library is searched for message facility “ERR” and message code D_CANTWRITE. The text of this message is passed on to S_BLD, with chnl and %ernum as additional arguments to S_BLD. The text will not be scanned for menu entry replacement. The resulting text is returned in msg, and its trimmed length is returned in msglen.

xcall u_text(mylib, "ERR", D_CANTWRITE, msg, msglen, TRUE, chnl, %ernum)