T_TXTRD

Read text from a window library

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall T_TXTRD(channel, entry_name, control, text, array_size, lines_read)

Arguments

channel

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

entry_name

The identifier (name) under which the text is stored in the library. (a)

control

One of the following processing controls on entry: D_FIRST to start with the first line or D_NEXT to continue with line after last read. (n)

text

The first element of the text array into which to read lines. (a)

array_size

The dimension of text. (n)

lines_read

Returned with the number of lines read. If zero, there are no more lines. (n)

Discussion

T_TXTRD reads lines of text from a window library text entry created using T_TXTWRT.

The channel must be opened in update mode. This allows T_TXTRD to modify the control record in order to maintain read context within the text entry.

Control is returned with a value of D_NOFIND (defined in tools.def) if the specified entry does not exist. D_NOFIND is a negative number, so you can test for an error by checking whether control is less than zero.

Examples

This example reads the first 10 lines from the window “menuhelp” in the window library opened on g_utlib and stores them into the variable helptxt. If “menuhelp” is not found, ctrl is returned as D_NOFIND.

ctrl = D_FIRST
xcall t_txtrd(g_utlib, "menuhelp", ctrl, helptxt, 10, rdsiz)