home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
CLIPPER
/
NFTROFF
/
7.TR
< prev
next >
Wrap
Text File
|
1993-12-01
|
18KB
|
1,228 lines
.de }n
.bp
.sp .5i
..
.wh -.8i }n
.sp .5i
.po -.4i
.ll 7.5i
.ps 9
.vs 9
.in 0i
.ta 1.63265i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DFCLOSE() Close file displayed by FT_DISPFILE()
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DFCLOSE()
Close file displayed by FT_DISPFILE()
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DFCLOSE() -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
Closes the file opened by FT_DFSETUP()
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
@ 4,9 TO 11,71
.sp
FT_DFSETUP("test\.txt", 5, 10, 10, 70, 1, 7, 15,;
.in 1.36i
"AaBb" + Chr(143), \.T\., 5, 132, 4096)
.sp
.in 0.4i
cKey = FT_DISPFILE()
.sp
FT_DFCLOSE()
.sp
@ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + \'[\' + cKey + \']\'
.sp
.in 0.08i
\fBSource:\fR DFILE\.PRG
.sp
\fBAuthor:\fR Mike Taylor
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_DFSETUP()
, FT_DISPFILE()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DFSETUP() Set up parameters for FT_DISPFILE()
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DFSETUP()
Set up parameters for FT_DISPFILE()
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
.br
\fBFT_DFSETUP( <cInFile>, <nTop>, <nLeft>, <nBottom>, <nRight>, ;
.in 1.12i
.ta 4.16i
.br
\fB<nStart>, <nCNormal>, <nCHighlight>, <cExitKeys>, ;
.br
.ta
.br
\fB<lBrowse>, <nColSkip>, <nRMargin>, <nBuffSize> ) -> nResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.64i
.ta 1.12i
\fB<cInFile>\fR - text file to display (full path and filename)
.br
.ta
.ta 1.12i
\fB<nTop>\fR - upper row of window
.br
.ta
.ta 1.12i
\fB<nLeft>\fR - left col of window
.br
.ta
.ta 1.12i
\fB<nBottom>\fR - lower row of window
.br
.ta
.ta 1.12i
\fB<nRight>\fR - right col of window
.br
.ta
.ta 1.12i
\fB<nStart>\fR - line to place highlight at startup
.br
.ta
.ta 1.12i 3.04i
\fB<nCNormal>\fR - normal text color (numeric attribute)
.br
.ta
.ta 3.04i
\fB<nCHighlight>\fR - text highlight color (numeric attribute)
.br
.ta
.ta 1.12i 3.04i
\fB<cExitKeys>\fR - terminating key list (each byte of string is a
.br
.ta
.in 1.92i
key code)
.in 0.64i
.ta 1.12i
\fB<lBrowse>\fR - act-like-a-browse-routine flag
.br
.ta
.ta 1.12i
\fB<nColSkip>\fR - col increment for left/right arrows
.br
.ta
.ta 1.12i
\fB<nRMargin>\fR - right margin - anything to right is truncated
.br
.ta
.ta 1.12i
\fB<nBuffSize>\fR - size of the paging buffer
.br
.ta
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
0 if successful, FError() code if not
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
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:
.sp
.in 0.64i
buffer size = (# of line) + 1 * RMargin
.sp
.in 0.4i
This is the smallest you should make the buffer\. For normal use,
4096 bytes is recommended
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
@ 4,9 TO 11,71
.sp
FT_DFSETUP("test\.txt", 5, 10, 10, 70, 1, 7, 15,;
.in 1.28i
"AaBb" + Chr(143), \.T\., 5, 132, 4096)
.sp
.in 0.4i
cKey = FT_DISPFILE()
.sp
FT_DFCLOSE()
.sp
@ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + \'[\' + cKey + \']\'
.sp
.in 0.08i
\fBSource:\fR DFILE\.PRG
.sp
\fBAuthor:\fR Mike Taylor
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_DISPFILE()
, FT_DFCLOSE()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_DISPFILE() Browse a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_DISPFILE()
Browse a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_DISPFILE() -> cExitkey
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The ASCII keystroke that terminated FT_DISPFILE()
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This routine displays a text file within a defined window using as
little memory as possible\. The text file to display has to be
present or an error value of 0 is returned (as a character\.)
.sp
Assumptions: The routine assumes that all lines are terminated
.in 1.44i
with a CR/LF sequence (0x0d and 0x0a)\.
.sp
.in 0.4i
.ta 1.04i
Note: Make sure you allocate a buffer large enough to hold
.br
.ta
.in 1.44i
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 and
for normal use I recommend 4096 bytes\.
.sp
.in 0.4i
.ta 2i
Cursor Keys: Up, Down - moves the highlight line
.br
.ta
.in 1.44i
Left, Right - moves the window over nColSkip col\'s
.ta 0.96i
Home - moves the window to the far left
.br
.ta
.ta 0.96i
End - moves the window to the nRMargin column
.br
.ta
.ta 0.96i
PgUp, PgDn - moves the highlight one page
.br
.ta
.ta 0.96i
Ctrl-PgUp - moves the highlight to the file top
.br
.ta
.ta 0.96i
Ctrl-PgDn - moves the highlight to the file bottom
.br
.ta
.ta 0.96i
Ctrl-Right - moves the window 16 col\'s to the right
.br
.ta
.ta 0.96i
Ctrl-Left - moves the window 16 col\'s to the left
.br
.ta
.sp
Esc, Return - terminates the function
.sp
All other keys are ignored unless they are specified
within cExitKeys parameter\. This list will tell the
routine what keys terminate the function\. Special
keys must be passed by a unique value and that value
can be found by looking in the keys\.h file\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
@ 4,9 TO 11,71
.sp
FT_DFSETUP("test\.txt", 5, 10, 10, 70, 1, 7, 15,;
.in 1.36i
"AaBb" + Chr(143), \.T\., 5, 132, 4096)
.sp
.in 0.4i
cKey = FT_DISPFILE()
.sp
FT_DFCLOSE()
.sp
@ 20,0 SAY "Key that terminated FT_DISPFILE() was: " + \'[\' + cKey + \']\'
.sp
.in 0.08i
\fBSource:\fR DISPC\.C
.sp
\fBAuthor:\fR Mike Taylor
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_DFSETUP()
, FT_DFCLOSE()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FEOF() Determine when end of text file is encountered
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FEOF()
Determine when end of text file is encountered
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FEOF() -> lResult
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
\.T\. if an attempt was made to skip past the last record of
the currently selected text file, otherwise \.F\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function is similar to the CLIPPER Eof() function\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
FT_FUSE( "FTTEXT\.C" )
.br
FT_FGOBOT()
.ta 1.52i
.br
? FT_FEOF() // \.F\.
.br
.ta
.br
FT_FSKIP()
.ta 1.52i
.br
? FT_FEOF() // \.T\.
.br
.ta
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FUSE()
, FT_FGOBOT()
, FT_FSKIP()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FGOBOT() Go to the last record in a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FGOBOT()
Go to the last record in a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FGOBOT() -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function moves the record pointer to the last record of the
file in the currently selected text file workarea\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// read last line
.br
FT_FUSE( "text\.c" )
.br
FT_FGOBOT()
.br
? FT_FREADLN()
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FSELECT()
, FT_FUSE()
, FT_FGOTOP()
, FT_FRECNO()
, FT_FREADLN()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FGOTO() Move record pointer to specific record in a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FGOTO()
Move record pointer to specific record in a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FGOTO( nLine ) -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nLine>\fR is the record number to go to\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function moves the record pointer to a specific record
in the file in the currently selected text file workarea\. If
the record number requested is greater than the number of records
in the file, the record pointer will be positioned at the last
record\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// read 5th line of text from file
.br
FT_FUSE( "FTTEXT\.C" )
.br
FT_FGOTO(5)
.br
cText := FT_FREADLN()
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FRECNO()
, FT_FGOTOP()
, FT_FGOBOT()
, FT_FREADLN()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FGOTOP() Go to the first record in a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FGOTOP()
Go to the first record in a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FGOTOP() -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function moves the record pointer to the first record
in the currently selected text file workarea\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 2i
.br
FT_FUSE( "text\.c" ) // open text file
.br
.ta
.br
DO WHILE !FT_FEOF()
.in 0.64i
.ta 1.76i
.br
? FT_FREADLN() // read thru file
.br
.ta
.br
FT_FSKIP()
.in 0.4i
.br
ENDDO
.ta 2i
.br
FT_FGOTOP() // go back to top
.br
.ta
.ta 2i
.br
? FT_FRECNO() // 1
.br
.ta
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FSELECT()
, FT_FUSE()
, FT_FRECNO()
, FT_FGOBOT()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FLASTREC() Determine the no\. of records in the currently selected text
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FLASTREC()
Determine the no\. of records in the currently selected text
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FLASTREC() -> nLastRecordNum
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
An integer containing the number of records in the text file in
the currently selected text file workarea, or zero if no file
is currently open in the workarea\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function returns the number of the last record in a text file\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
FT_FUSE( "text\.c" )
.br
? FT_FLASTREC()
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FUSE()
, FT_FGOBOT()
, FT_FRECNO()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FREADLN() Read a line from the currently selected text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FREADLN()
Read a line from the currently selected text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FREADLIN() -> cLine
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
A string containing the current record in a text file\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function returns a line of text read from the file in the
currently selected text file workarea\. Text lines are delimited
with a CRLF pair\. The record pointer is not moved\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// display each record of a text file
.br
FT_FUSE( "text\.c" )
.br
DO WHILE ! FT_FEOF()
.in 0.64i
.br
? FT_FREADLN()
.br
FT_FSKIP()
.in 0.4i
.br
ENDDO
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FUSE()
, FT_FRECNO()
, FT_FGOTOP()
, FT_FGOBOT()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FRECNO() Return the current record number of a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FRECNO()
Return the current record number of a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FRECNO() -> nRecNo
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
None
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The current record number of a text file or 0 if no file is open\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function returns the current record number of the file open
in the currently selected text file workarea\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 2i
.br
FT_FUSE( "text\.c" ) // open text file
.br
.ta
.br
DO WHILE !FT_FEOF()
.in 0.64i
.ta 1.76i
.br
? FT_FREADLN() // read thru file
.br
.ta
.br
FT_FSKIP()
.in 0.4i
.br
ENDDO
.ta 2i
.br
FT_FGOTOP() // go back to top
.br
.ta
.ta 2i
.br
? FT_FRECNO() // 1
.br
.ta
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FSELECT()
, FT_FUSE()
, FT_FGOTOP()
, FT_FGOBOT()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FSELECT() Select a text file workarea
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FSELECT()
Select a text file workarea
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FSELECT( <nArea> ) -> nArea
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nArea>\fR is the text file workarea to select\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
The current selected text file area if no parameter is passed,
otherwise the previous area if a new area is selected\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function selects a text file "workarea" from 1 to 10\. A
file may or may not be open in the selected area\.
.sp
Each file is opened in its own "workarea", similar to the concept
used by dbf files\. As provided, a maximum of 10 files (in 10
workareas) can be opened (assuming there are sufficient file
handles available)\. That number may be increased by modifying
the #define TEXT_WORKAREAS in the C source code and recompiling\.
.sp
All the FT_F*() file functions operate on the file in the currently
selected text file workarea\.
.sp
Text file workareas are separate from and independent of Clipper\'s
database workareas\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
FT_FSELECT(1)
.br
nFile1 := FT_FUSE( "temp\.c" )
.ta 2.56i
.br
? FT_FLASTREC() // no\. of lines in temp\.c
.br
.ta
.br
FT_FSELECT(2)
.br
nFile2 := FT_FUSE( "temp\.h" )
.ta 2.56i
.br
? FT_FLASTREC() // no\. of lines in temp\.h
.br
.ta
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FUSE()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FSKIP() Move the record pointer to a new position in a text file
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FSKIP()
Move the record pointer to a new position in a text file
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FSKIP( [ <nLines> ] ) -> NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<nLines>\fR is the number of lines to skip\. Defaults to 1 if
not specified\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
NIL
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
This function moves the text file record pointer, similar to
the CLIPPER SKIP command\.
.sp
A text file "record" is a line of text terminated by a CRLF pair\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.br
// display each record of a text file
.br
FT_FUSE( "text\.c" )
.br
DO WHILE ! FT_FEOF()
.in 0.64i
.br
? FT_FREADLN()
.br
FT_FSKIP()
.in 0.4i
.br
ENDDO
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FRECNO()
, FT_FGOTOP()
, FT_FGOBOT()
.ta 1.63265i
.in 0i
.sp 2
.ne 20
.ps +3
.vs +3
FT_FUSE() Open or close a text file for use by the FT_F* functions
.br
.ta
.in 0.08i
.ps -3
.vs -3
.sp 2
\fBFT_FUSE()
Open or close a text file for use by the FT_F* functions
.in 0i
.br
\l'6.24i'
.br
.sp
.in 0.08i
\fBSyntax
.sp
.in 0.4i
\fBFT_FUSE( [ <cFile> ] ) -> nHandle | NIL
.sp
.in 0.08i
\fBArguments
.sp
.in 0.4i
\fB<cFile>\fR is the text file you want to open\. If not specified,
the file currently open, if any, will be closed\.
.sp
.in 0.08i
\fBReturns
.sp
.in 0.4i
If <cFile> is passed and the file is opened successfully, an
integer containing the file handle\. If the file cannot be
opened, -1 will be returned\.
.sp
If FT_FUSE() is called without any arguments, it will close the
text file in the current "text area" and return NIL\.
.sp
.in 0.08i
\fBDescription
.sp
.in 0.4i
The FT_F*() file functions are for reading text files, that is,
files where each line (record) is delimited by a CRLF pair\.
.sp
Each file is opened in its own "workarea", similar to the concept
use by dbf files\. As provided, a maximum of 10 files (in 10
workareas) can be opened (assuming there are sufficient file
handles available)\. That number may be increased by modifying
the #define TEXT_WORKAREAS in the C source code and recompiling\.
.sp
.in 0.08i
\fBExamples
.sp
.in 0.4i
.ta 2i
.br
FT_FUSE( "text\.c" ) // open text file
.br
.ta
.br
DO WHILE !FT_FEOF()
.in 0.64i
.br
? FT_FREADLN()
.br
FT_FSKIP()
.in 0.4i
.br
ENDDO
.ta 2i
.br
FT_FUSE() // close file
.br
.ta
.sp
.in 0.08i
\fBSource:\fR FTTEXT\.C
.sp
\fBAuthor:\fR Brice de Ganahl
.in 0i
.sp
.in 1.5i
.ti -1.5i
.ta 1.5i
.ft B
See Also:
.ft R
FT_FUSE()
, FT_FSELECT()