libexplain  1.4.D001
Functions
libexplain/buffer/check_fildes_range.h File Reference
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

int explain_buffer_check_fildes_range (explain_string_buffer_t *sb, int fildes, const char *caption)

Function Documentation

int explain_buffer_check_fildes_range ( explain_string_buffer_t sb,
int  fildes,
const char *  caption 
)

The explain_buffer_check_fildes_range function may be used to check that a file descriptor is within the acceptable range, and print an explanation if it is not.

Parameters:
sbThe string buffer to print into.
fildesThe file descriptor value to be checked.
captionThe name of the function call argument containg the file descriptor value to be checked.
Returns:
0 if printed an explanation, -1 if not out of range (no explanation printed)

Definition at line 71 of file check_fildes_range.c.