/* $DOC$ $NAME$ ft_DFSetup() $CATEGORY$ File I/O $ONELINER$ Set up parameters for ft_DispFile() $SYNTAX$ ft_DFSetup( , , , , , ; , , , , ; , , , ) -> nResult $ARGUMENTS$ - text file to display (full path and filename) - upper row of window - left col of window - lower row of window - right col of window - line to place highlight at startup - normal text color (numeric attribute) - text highlight color (numeric attribute) - terminating key list (each byte of string is a key code) - act-like-a-browse-routine flag - col increment for left/right arrows - right margin - anything to right is truncated - size of the paging buffer $RETURNS$ 0 if successful, FError() code if not $DESCRIPTION$ Note: make sure you allocate a buffer large enough to hold enough data for the number of lines that you have in the window. Use the following formula as a guideline: buffer size = (# of line) + 1 * RMargin This is the smallest you should make the buffer. For normal use, 4096 bytes is recommended $EXAMPLES$ #include "inkey.ch" @ 4, 9 TO 11, 71 ft_DFSetup( "test.txt", 5, 10, 10, 70, 1, 7, 15, ; { "A", "a", "B", "b", K_F3 }, .T., 5, 132, 4096 ) cKey := ft_DispFile() ft_DFClose() @ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]" $SEEALSO$ ft_DispFile(), ft_DFClose() $END$ */ /* $DOC$ $NAME$ ft_DFClose() $CATEGORY$ File I/O $ONELINER$ Close file displayed by ft_DispFile() $SYNTAX$ ft_DFClose() -> NIL $ARGUMENTS$ None $RETURNS$ NIL $DESCRIPTION$ Closes the file opened by ft_DFSetup() $EXAMPLES$ #include "inkey.ch" @ 4, 9 TO 11, 71 ft_DFSetup( "test.txt", 5, 10, 10, 70, 1, 7, 15, ; { "A", "a", "B", "b", K_F3 }, .T., 5, 132, 4096 ) cKey := ft_DispFile() ft_DFClose() @ 20, 0 SAY "Key that terminated ft_DispFile() was: " + "[" + cKey + "]" $SEEALSO$ ft_DFSetup(), ft_DispFile() $END$ */