libexplain  1.4.D001
Functions
libexplain/buffer/einval/format_string.c File Reference
#include <libexplain/ac/assert.h>
#include <libexplain/ac/stdio.h>
#include <libexplain/ac/string.h>
#include <libexplain/buffer/einval.h>

Go to the source code of this file.

Functions

void explain_buffer_einval_format_string (explain_string_buffer_t *sb, const char *caption, const char *value, size_t errpos)
void explain_buffer_einval_format_string_hole (explain_string_buffer_t *sb, const char *caption, int hole_index)

Function Documentation

void explain_buffer_einval_format_string ( explain_string_buffer_t sb,
const char *  argument_name,
const char *  argument_value,
size_t  errpos 
)

The explain_buffer_einval_format_string function is used to report problems concerning invalid format strings.

Parameters:
sbThe buffer to print into.
argument_nameThe name of the offending system call argument.
argument_valueThe value of the offending system call argument (format string).
errposThe position within the string that the error was discovered.

Definition at line 27 of file format_string.c.

void explain_buffer_einval_format_string_hole ( explain_string_buffer_t sb,
const char *  argument_name,
int  hole_index 
)

The explain_buffer_einval_format_string_hole function is used to report problems concerning invalid format strings, in the case where n$ does not appear in the format string when it should.

Parameters:
sbThe buffer to print into.
argument_nameThe name of the offending system call argument.
hole_indexThe n$ argument that has not been used.

Definition at line 110 of file format_string.c.