libexplain  1.4.D001
Functions | Variables
libexplain/buffer/lseek_whence.c File Reference
#include <libexplain/ac/unistd.h>
#include <libexplain/buffer/lseek_whence.h>
#include <libexplain/parse_bits.h>
#include <libexplain/sizeof.h>
#include <libexplain/string_buffer.h>

Go to the source code of this file.

Functions

void explain_buffer_lseek_whence (explain_string_buffer_t *sb, int whence)
int explain_lseek_whence_parse_or_die (const char *text, const char *caption)

Variables

static const
explain_parse_bits_table_t 
table []

Function Documentation

void explain_buffer_lseek_whence ( struct explain_string_buffer_t sb,
int  whence 
)

The explain_buffer_lseek_whence function may be used to form a human readable representation of an lseek when value.

Parameters:
sbthe string buffer in which to write the whens symbol
whencethe value to be decoded

Definition at line 48 of file lseek_whence.c.

int explain_lseek_whence_parse_or_die ( const char *  text,
const char *  caption 
)

The explain_lseek_whence_parse function may be used to parse a text string into an lseek whence value. It may be symbolic or numeric. If an error occurs, will print a diagnostic and exit.

Parameters:
textThe text string to be parsed.
captionan additional caption to add to the error message.
Returns:
an lseek whence value

Definition at line 61 of file lseek_whence.c.


Variable Documentation

Initial value:
{
    { "SEEK_SET", SEEK_SET },
    { "SEEK_CUR", SEEK_CUR },
    { "SEEK_END", SEEK_END },









    { "L_SET", SEEK_SET },
    { "L_INCR", SEEK_CUR },
    { "L_XTND", SEEK_END },
}

Definition at line 27 of file lseek_whence.c.