Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

Code Block
languagecpp
int  fs_setvbuf (FS_FILE    *p_file,

...


                 char       *p_buf,

...


                 int         mode,
                 fs_size_t   size);

...

HTML Table
summary
classPlain_Table
Table Row (tr)
Table Cell (td)
Anchor
11101761110176


File

...

Called from

...

...

Code enabled by

...

fs_api.c

...

...

Application

...

FS_CFG_API_EN and FS_CFG_FILE_BUF_EN

Anchor10923911092391Assign buffer to a file. Anchor11048631104863

Arguments

Anchor10923931092393p_file Anchor11409241140924

Pointer to a file.

Anchor10923941092394p_buf Anchor11409311140931

Pointer to buffer.

...

modeanchor11409381140938

Buffer mode:

...

...

classWebWorks_Indent_1

...

FS__IONBR

...

classWebWorks_Indent_2

...

...

Unbuffered.

...

classWebWorks_Indent_1

...

FS__IOFBF

...

classWebWorks_Indent_2

...

Fully buffered.

...

classWebWorks_Indent_1

...

size

...

classWebWorks_Indent_2

...

...

Size of buffer, in octets.

...

Returned Value

Anchor10924001092400-1, if an error occurs. Anchor

109240110924010, if no error occurs.anchor11002611100261

Notes/Warnings

...

...

  1. fs_setvbuf() must be used after a stream is opened but before any other operation is performed on stream.

...

  1. sizemust be more than or equal to the size of one sector; it will be rounded DOWN to the nearest size of a multiple of full sectors.

...

...

  1. Once a buffer is assigned to a file, a new buffer may not be assigned nor may the assigned buffer be removed. To change the buffer, the file should be closed and re-opened.

...

  1. Upon power loss, any data stored in file buffers will be lost.