This subroutine will insert the entire contents of the given file into the specified buffer starting at the current buffer (cursor) position.
The call will also recalculate all markers to maintain its respective positions. The current buffer position is updated accordingly and is on the first byte behind the inserted data after the call.
SYNTAX:
BufInsertFile buf$(), fileSpec$
INPUTS:
buf$() (STRING array)
- This is the array of any existing and initialized buffer, in which you want to insert the file data.
fileSpec$ (STRING)
- The name of the file to insert. You may also add a path, if required. Make sure the specified file exists to avoid errors.
NOTES:
- If you've inserted a pure text file, which is using different line endings than your given buffer (maybe a file from a different OS), then you may want to call the appropriate conversion subroutine ConvBufToNativeEol(), ConvBufToWinEol() or ConvBufToLnxMacEol() right after inserting the text file to bring all data in line with your given buffer's line endings again.