libexplain
1.4.D001
|
#include <libexplain/ac/unistd.h>
#include <libexplain/buffer/access_mode.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_access_mode (explain_string_buffer_t *sb, int mode) |
int | explain_access_mode_parse (const char *text) |
int | explain_access_mode_parse_or_die (const char *text, const char *caption) |
Variables | |
static const explain_parse_bits_table_t | table [] |
int explain_access_mode_parse | ( | const char * | text | ) |
The explain_access_mode_parse function may be used to parse a C-like expression string, into an access(2) mode argument.
text | The text to be parsed. |
Definition at line 48 of file access_mode.c.
int explain_access_mode_parse_or_die | ( | const char * | text, |
const char * | caption | ||
) |
The explain_access_mode_parse_or_die function may be used to parse a C-like expression string, into an access(2) mode argument. If string is not valie, issues a diagnostic and exits EXIT_FAILURE.
text | The text to be parsed. |
caption | Caption for error message, or NULL for none. |
Definition at line 59 of file access_mode.c.
void explain_buffer_access_mode | ( | struct explain_string_buffer_t * | sb, |
int | mode | ||
) |
The explain_buffer_access_mode function may be used to emit a human readable representation of an access mode.
sb | The string buffer to print into. |
mode | The access(2) mode to encode. |
Definition at line 38 of file access_mode.c.
const explain_parse_bits_table_t table[] [static] |
{ { "F_OK", F_OK }, { "R_OK", R_OK }, { "W_OK", W_OK }, { "X_OK", X_OK }, }
Definition at line 28 of file access_mode.c.