|
libexplain
1.4.D001
|
#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 [] |
| 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.
| sb | the string buffer in which to write the whens symbol |
| whence | the 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.
| text | The text string to be parsed. |
| caption | an additional caption to add to the error message. |
Definition at line 61 of file lseek_whence.c.
const explain_parse_bits_table_t table[] [static] |
{
{ "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.
1.7.6.1