Unit 'amigados' Package
[Overview][Constants][Types][Procedures and functions][Index] [#amunits]

SetVBuf

Set buffering modes and size

Declaration

Source position: amigados.pas line 1723

function SetVBuf(

  fh: LongInt;

  buff: pCHAR;

  type_: LongInt;

  size: LongInt

):LongBool;

Arguments

buff

  

Buffer pointer for buffered I/O or nil. Must be 4-aligned!

type_

  

buffering mode (BUF_*)

size

  

Size of buffer for buffered I/O (sizes less than 208 bytes will be rounded up to 208), or -1.

Description

Changes the buffering modes and buffer size for a filehandle. With buff = nil, the current buffer will be deallocated and a new one of (approximately) size will be allocated. If buffer is non-nil, it will be used for buffering and must be at least max(size,208) bytes long, and must be longword aligned. If size is -1, then only the buffering mode will be changed.

Note that a user-supplied buffer will not be freed if it is later replaced by another SetVBuf() call, nor will it be freed if the filehandle is closed.

Has no effect on the buffersize of filehandles that were not created by AllocDosObject().

See also

FPutC

  

Write a character to the specified output

FGetC

  

Read a character from the specified input (buffered)

UnGetC

  

Makes a char available for reading again. (buffered)

DosFlush

  

Flushes buffers for a buffered filehandle

FRead

  

Reads a number of blocks from an input (buffered)

FWrite

  

Writes a number of blocks to an output (buffered)

FGets

  

Reads a line from the specified input (buffered)

FPuts

  

Writes a string the the specified output

AllocDosObject

  

Creates a dos object


Documentation generated on: 2021-07-30