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

Go to the source code of this file.

Functions

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

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.