blocxx
Namespaces | Functions

SafeCStringIO.hpp File Reference

#include "blocxx/BLOCXX_config.h"
#include <cstdio>

Go to the source code of this file.

Namespaces

namespace  BLOCXX_NAMESPACE
 

Taken from RFC 1321.


namespace  BLOCXX_NAMESPACE::SafeCString

Functions

char * BLOCXX_NAMESPACE::SafeCString::fgets_trunc (char *dst, std::size_t dstsize, std::FILE *fp)
 PROMISE: Equivalent to std::fgets, except that I/O errors are reported by throwing an exception.
template<std::size_t N>
char * BLOCXX_NAMESPACE::SafeCString::fgets_trunc (char(&dst)[N], std::FILE *fp)
 A variant of fgets_trunc that infers the destination buffer size.
char * BLOCXX_NAMESPACE::SafeCString::fgets_check (char *dst, std::size_t dstsize, std::FILE *fp)
 PROMISE: Equivalent to std::fgets, except that I/O errors and truncated lines are reported by throwing an exception.
template<std::size_t N>
char * BLOCXX_NAMESPACE::SafeCString::fgets_check (char(&dst)[N], std::FILE *fp)
 A variant of fgets_check that infers the destination buffer size.
String BLOCXX_NAMESPACE::SafeCString::fget_string (std::FILE *fp, std::size_t max_chars)
 RETURNS: A String created by reading from fp until either EOF or a newline is encountered.