|
Classes |
class | Ratio |
| Class representing a ratio. More...
|
class | cstring |
| A smart pointer class for C strings. More...
|
class | insensitive_less |
| Functor used for case-insensitive comparison between two strings. More...
|
Enumerations |
enum | { ctNone = 0,
ctLowerCase = 1,
ctUpperCase = 2
} |
| Possible transformations for crc*_str() functions. More...
|
Functions |
void | absolute_path (char *buf, size_t len, char const *default_dir, char const *filename) |
| Fills buf with the absolute path to filename.
|
cstring | absolute_path (char const *default_dir, char const *filename) |
| Generates a string with the absolute path to filename.
|
std::string | absolute_path (std::string const &default_dir, std::string const &filename) |
| Same as absolute_path(char const *, char const *), but with std::string's.
|
size_t | base64_decode (char const *input, size_t input_len, char *output) |
| Decodes the input from base64.
|
size_t | base64_encode (char const *input, size_t input_len, char *output) |
| Encodes the input in base64.
|
size_t | base64_decode_str (char const *input, size_t input_len, char *output) |
| Like base64_decode, but the output buffer will be NULL terminated.
|
size_t | base64_encode_str (char const *input, size_t input_len, char *output) |
| Like base64_encode, but the output buffer will be NULL terminated.
|
uint16_t | crc16 (char const *buf, size_t len, uint16_t start=0) |
| Computes the CRC16 checksum of the given buffer.
|
uint16_t | crc16_str (char const *s, int trans=ctNone) |
| Computes the CRC16 checksum of a NULL-terminated string.
|
uint32_t | crc32 (char const *buf, size_t len, uint32_t start=0xFFFFFFFF, bool last=true) |
| Computes the CRC32 checksum of the given buffer.
|
uint32_t | crc32_str (char const *s, int trans=ctNone) |
| Computes the CRC32 checksum of a NULL-terminated string.
|
uint16_t | crc_ccitt (char const *buf, size_t len, uint16_t start=0xFFFF) |
| Computes the CRC-CCITT checksum of the given buffer.
|
uint16_t | crc_ccitt_str (char const *s, int trans=ctNone) |
| Computes the CRC-CCITT checksum of a NULL-terminated string.
|
uint16_t | crc_dnp (char const *buf, size_t len, uint16_t start=0, bool last=true) |
| Computes the CRC-DNP checksum of the given buffer.
|
uint16_t | crc_dnp_str (char const *s, int trans=ctNone) |
| Computes the CRC-DNP checksum of a NULL-terminated string.
|
char * | duration_expr (char *buf, size_t len, time_t secs) |
| Converts a number of seconds to a duration expression.
|
bool | duration_scan (char const *expr, time_t *secs) |
| Scans a string expression of a duration.
|
bool | dir_exists (char const *dirname) |
| Determines whether the given directory exists.
|
bool | file_exists (char const *filename) |
| Determines whether the given file exists.
|
bool | match (char const *pattern, char const *str, bool cs=false) |
| Matches a string against a pattern.
|
bool | irc_match (char const *pattern, char const *str) |
| Same as match but optimized and suited for IRC (always case-insensitive).
|
bool | simple_range (char const *expr, unsigned long *first, unsigned long *last, bool desc=false) |
| Converts a simple range expression.
|
bool | complex_range (char const **expr, unsigned long *first, unsigned long *last, bool desc=false) |
| Converts a complex range expression.
|
bool | recursive_mkdir (char const *pathname, mode_t mode) |
| Creates a directory recursively.
|
bool | resolve_error (char *buf, size_t len, int err) |
| Gets resolve error message.
|
bool | resolve_host (char const *host, struct in_addr *in, int *err) |
| Resolves a hostname.
|
char * | nstrdup (char const *str) |
| Duplicates a string using operator new [].
|
bool | strtol_range (long *num, char const *str, long min, long max, int base=10) |
| Range checking version of strtol.
|
bool | strtoul_range (unsigned long *num, char const *str, unsigned long min, unsigned long max, int base=10) |
| Range checking version of strtoul (see strtol_range).
|
Variables |
size_t const | DOMAIN_MAX = 255 |
| Maximum length for a domain name.
|
size_t const | LABEL_MAX = 63 |
| Maximum length for labels of a domain name.
|