Modular C
C◼io◼buf Interfaces to handle stream buffers.
+ Collaboration diagram for C◼io◼buf Interfaces to handle stream buffers.:

Modules

 Platform features used by module C◼io◼buf
 Some features are recovered or pre-computed specifically for the target platform by looking into the C include files:
 
 Specific macros to deal with the structure of module C◼io◼buf.
 

Macros

#define C◼io◼buf◼set(...)   _Generic(C◼macro◼ARG3(__VA_ARGS__, (C◼macro◼incomp0*)0, (C◼macro◼incomp1*)0) C◼macro◼incomp1*: C◼io◼buf◼set2(C◼macro◼HAVE2(__VA_ARGS__)), C◼macro◼incomp0*: C◼io◼buf◼set3(C◼macro◼HAVE3(__VA_ARGS__, C◼io◼buf◼SIZE)), default: C◼io◼buf◼set4(C◼macro◼HAVE4(__VA_ARGS__, C◼io◼buf◼FBF, C◼io◼buf◼SIZE)) )
 A generic interface to set the buffering properties of an IO stream. More...
 

Functions

void C◼io◼buf◼set2 (C◼io *restrict s, char *restrict buf)
 Set buffering of s according to buf with fixed size. More...
 
int C◼io◼buf◼set4 (C◼io *restrict s, char *restrict buf, int mode, C◼size size)
 Set buffering of s according to buf with dynamic size and specific mode. More...
 
void C◼io◼buf◼set3 (C◼io *restrict s, char *restrict buf, C◼size size)
 Set buffering of s according to buf with dynamic size. More...
 
void C◼io◼buf◼set1 (C◼io *restrict s)
 Set buffering of s to line buffering. More...
 

Detailed Description

See also
C◼io◼buf◼set is the principal interface of this module

Macro Definition Documentation

§ C◼io◼buf◼set

A generic interface to set the buffering properties of an IO stream.

Its behavior depends on the number of arguments that it receives, according that number it calls C◼io◼set1, C◼io◼set2, C◼io◼set3 or C◼io◼set4, respectively.

Definition at line 151 of file C-io-buf.c.

Function Documentation

§ C◼io◼buf◼set1()

void C◼io◼buf◼set1 ( C◼io *restrict  s)
inline

Set buffering of s to line buffering.

Definition at line 171 of file C-io-buf.c.

References C◼io◼buf◼LBF, C◼io◼buf◼set4(), C◼io◼buf◼SIZE, C◼MODULE_ABI, and C◼MODULE_FEATURES.

171  {
172 #line 69 "/home/gustedt/build/cmod/C/C-io-buf.X"
174 }
#define C◼io◼buf◼LBF
The platform specific value _IOLBF.
Definition: C-io-buf.c:52
#define C◼io◼buf◼SIZE
The platform specific value BUFSIZ.
int C◼io◼buf◼set4(C◼io *restrict s, char *restrict buf, int mode, C◼size size)
Set buffering of s according to buf with dynamic size and specific mode.
+ Here is the call graph for this function:

§ C◼io◼buf◼set2()

void C◼io◼buf◼set2 ( C◼io *restrict  s,
char *restrict  buf 
)

Set buffering of s according to buf with fixed size.

If buf is a null pointer, buffering is switched off. If it is not a null pointer, it must have a size of at least io¯buf¯SIZE bytes.

§ C◼io◼buf◼set3()

void C◼io◼buf◼set3 ( C◼io *restrict  s,
char *restrict  buf,
C◼size  size 
)
inline

Set buffering of s according to buf with dynamic size.

If buf is a null pointer, buffering is switched off. If it is not a null pointer, it must have a size of at least size bytes.

Definition at line 162 of file C-io-buf.c.

References C◼io◼buf◼FBF, C◼io◼buf◼NBF, and C◼io◼buf◼set4().

162  {
163 #line 61 "/home/gustedt/build/cmod/C/C-io-buf.X"
165 }
#define C◼io◼buf◼FBF
The platform specific value _IOFBF.
Definition: C-io-buf.c:46
int C◼io◼buf◼set4(C◼io *restrict s, char *restrict buf, int mode, C◼size size)
Set buffering of s according to buf with dynamic size and specific mode.
__size size
#define C◼io◼buf◼NBF
The platform specific value _IONBF.
Definition: C-io-buf.c:49
+ Here is the call graph for this function:

§ C◼io◼buf◼set4()

int C◼io◼buf◼set4 ( C◼io *restrict  s,
char *restrict  buf,
int  mode,
C◼size  size 
)

Set buffering of s according to buf with dynamic size and specific mode.

If buf is a null pointer, buffering is switched off.

Referenced by C◼io◼buf◼set1(), and C◼io◼buf◼set3().

+ Here is the caller graph for this function: