libexplain  1.4.D001
Functions
libexplain/string_to_thing.h File Reference
#include <libexplain/ac/stddef.h>
#include <libexplain/ac/sys/socket.h>
#include <libexplain/ac/stdio.h>
#include <libexplain/ac/unistd.h>

Go to the source code of this file.

Functions

size_t explain_parse_size_t_or_die (const char *text)
ssize_t explain_parse_ssize_t_or_die (const char *text)
ptrdiff_t explain_parse_ptrdiff_t_or_die (const char *text)
off_t explain_parse_off_t_or_die (const char *text)
void * explain_parse_pointer_or_die (const char *text)
long explain_parse_long_or_die (const char *text)
unsigned long explain_parse_ulong_or_die (const char *text)
long long explain_parse_longlong_or_die (const char *text)
unsigned long long explain_parse_ulonglong_or_die (const char *text)
socklen_t explain_parse_socklen_t_or_die (const char *text)
int explain_parse_int_or_die (const char *text)
unsigned explain_parse_uint_or_die (const char *text)
double explain_parse_double_or_die (const char *text)
float explain_parse_float_or_die (const char *text)
long double explain_parse_long_double_or_die (const char *text)
uid_t explain_parse_uid_t_or_die (const char *text)
gid_t explain_parse_gid_t_or_die (const char *text)
int explain_parse_bool_or_die (const char *text)
FILE * explain_parse_stream_or_die (const char *text, const char *mode)

Function Documentation

int explain_parse_bool_or_die ( const char *  text)

Definition at line 34 of file bool.c.

double explain_parse_double_or_die ( const char *  text)

The explain_string_to_double function may be used to convert text to a double-precision floating-point value.

Parameters:
textThe text to be converted.
Returns:
On success, a floating-point value. On error, prints an error message and does not return.

Definition at line 25 of file double.c.

float explain_parse_float_or_die ( const char *  text)

The explain_string_to_float function may be used to convert text to a single-precision floating-point value.

Parameters:
textThe text to be converted.
Returns:
On success, a floating-point value. On error, prints an error message and does not return.

Definition at line 25 of file float.c.

gid_t explain_parse_gid_t_or_die ( const char *  text)

The explain_parse_gid_t_or_die function may be used to convert text to a group ID.

Parameters:
textThe text to be converted.
Returns:
On success, a gid. On error, prints an error message and does not return.

Definition at line 30 of file gid.c.

int explain_parse_int_or_die ( const char *  text)

The explain_parse_int_or_die function may be used to convert text to a int value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 24 of file int.c.

long double explain_parse_long_double_or_die ( const char *  text)

The explain_string_to_long_double function may be used to convert text to a triple-precision floating-point value.

Parameters:
textThe text to be converted.
Returns:
On success, a floating-point value. On error, prints an error message and does not return.

Definition at line 25 of file long_double.c.

long explain_parse_long_or_die ( const char *  text)

The explain_parse_long_or_die function may be used to convert text to a long value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 25 of file long.c.

long long explain_parse_longlong_or_die ( const char *  text)

The explain_string_to_longlong function may be used to convert text to a long long value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 25 of file longlong.c.

off_t explain_parse_off_t_or_die ( const char *  text)

The explain_string_to_thing function may be used to convert text to a off_t value.

Parameters:
textThe text to be converted.
Returns:
On success, a off_t value. On error, prints an error message and does not return.

Definition at line 24 of file off_t.c.

void* explain_parse_pointer_or_die ( const char *  text)

The explain_string_to_thing function may be used to convert text to a pointer value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 28 of file pointer.c.

ptrdiff_t explain_parse_ptrdiff_t_or_die ( const char *  text)

The explain_string_to_thing function may be used to convert text to a ptrdiff_t value.

Parameters:
textThe text to be converted.
Returns:
On success, a ptrdiff_t value. On error, prints an error message and does not return.

Definition at line 24 of file ptrdiff_t.c.

size_t explain_parse_size_t_or_die ( const char *  text)

The explain_string_to_thing function may be used to convert text to a size_t value.

Parameters:
textThe text to be converted.
Returns:
On success, a size_t value. On error, prints an error message and does not return.

Definition at line 24 of file size_t.c.

socklen_t explain_parse_socklen_t_or_die ( const char *  text)

The explain_string_to_socklen_t function may be used to convert text to a socklen_t value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 24 of file socklen_t.c.

ssize_t explain_parse_ssize_t_or_die ( const char *  text)

The explain_parse_ssize_t_or_die function may be used to convert text to a ssize_t value.

Parameters:
textThe text to be converted.
Returns:
On success, a ssize_t value. On error, prints an error message and does not return.

Definition at line 24 of file ssize_t.c.

FILE* explain_parse_stream_or_die ( const char *  text,
const char *  mode 
)

Definition at line 24 of file stream.c.

uid_t explain_parse_uid_t_or_die ( const char *  text)

The explain_parse_uid_t_or_die function may be used to convert text to a user ID.

Parameters:
textThe text to be converted.
Returns:
On success, a uid. On error, prints an error message and does not return.

Definition at line 30 of file uid.c.

unsigned explain_parse_uint_or_die ( const char *  text)

The explain_string_to_uint function may be used to convert text to an unsigned int value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 26 of file uint.c.

unsigned long explain_parse_ulong_or_die ( const char *  text)

The explain_string_to_ulong function may be used to convert text to an unsigned long value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 25 of file ulong.c.

unsigned long long explain_parse_ulonglong_or_die ( const char *  text)

The explain_string_to_ulonglong function may be used to convert text to an unsigned long long value.

Parameters:
textThe text to be converted.
Returns:
On success, a pointer value. On error, prints an error message and does not return.

Definition at line 25 of file ulonglong.c.