Infrasctucture Txt Function Reference
Txt
The Text layer allows easy manipulation of text files.

txAdd txClose txDel txIns txKeyLin txOpen
txNew txNbrLin txNxtLin txRpl txSrt

int txAdd( int handle, char* fmt, elipsis )
Add a line of text to the file at the end of the file. Return OK, or ERR.


int txClose( int handle )
Close the txt file associated with "handle".


int txDel( int linNbr )
Delete a line of text from the file at line number "linNbr". Return OK, ERR,or NOTFND. Note this renumbers the lines in the file.


int txIns( int hndl, int linNbr, char* fmt, elipsis )
Insert a line of text "text" into the text file "hndl" at "linNbr". Return OK or ERR.


int txKeyLin( int hndl, char* out, char* key )
Search for the next line with contents matching "key". Copy the line, if found, to the output buffer "out".


int txOpen( char* filNam, elipsis )
Open a disk file "filNam" and return a handle associated with it else NOTFND.


int txNew( char* filNam, elipsis )
Create a new file temporarily labeled as "filNam" and return the handle associated with it.


int txNbrLin( int hndl, char* out, int linNbr )
Find the text line numbered "linNbr" and copy it to the buffer "out". Returns OK if found, else NOTFND.


int txNxtLin( int hndl, char* buf )
Get the next line in the file, copy it's contents to "buf". Return OK else NOTFND.


int txRpl( int hndl, int linNbr, char* fmt, elipsis )
Replace the line at "linNbr" with with the string in buffer "text". Return OK. Note: this renumbers the lines in the file.


int txSrt( int hndl, int delimter, int fldNbr )
Sort the lines in the text file. Each line will be parsed using the "delimiter" the the fldNbr will be used as the sort key. Return OK.