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

Go to the source code of this file.

Functions

void explain_buffer_resource (explain_string_buffer_t *sb, int resource)
int explain_parse_resource_or_die (const char *text, const char *caption)

Variables

static const
explain_parse_bits_table_t 
table []

Function Documentation

void explain_buffer_resource ( explain_string_buffer_t sb,
int  value 
)

The explain_buffer_resource function may be used to print the value of a getrlimit or setrlimit "resource" arument.

Parameters:
sbThe string buffer to print into.
valueThe value to be printed

Definition at line 116 of file resource.c.

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

The explain_parse_resource_or_die function s isused to parse a text string into a getrlimit or setrlimit resource value. On error, printed a diagnostics and exits EXIT_FAILURE.

Parameters:
textThe text to be parsed
captionadditional text for the error message, if needed
Returns:
the resource value

Definition at line 129 of file resource.c.


Variable Documentation

Definition at line 26 of file resource.c.