 |
Livox SDK API
V2.0.0
|
Go to the documentation of this file.
11 #if defined(__MINGW32__) || defined(__CYGWIN__)
13 # undef __STRICT_ANSI__
24 #if defined __APPLE__ || defined(__FreeBSD__)
31 # if defined(_WIN32) && !defined(__MINGW32__)
33 # define FMT_POSIX(call) _##call
35 # define FMT_POSIX(call) call
41 # define FMT_POSIX_CALL(call) FMT_SYSTEM(call)
43 # define FMT_SYSTEM(call) call
46 # define FMT_POSIX_CALL(call) ::_##call
48 # define FMT_POSIX_CALL(call) ::call
55 # define FMT_RETRY_VAL(result, expression, error_result) \
57 result = (expression); \
58 } while (result == error_result && errno == EINTR)
60 # define FMT_RETRY_VAL(result, expression, error_result) result = (expression)
63 #define FMT_RETRY(result, expression) FMT_RETRY_VAL(result, expression, -1)
92 template <
typename Char>
109 const Char *
c_str()
const {
return data_; }
176 template <
typename... Args>
193 explicit file(
int fd) : fd_(fd) {}
211 void operator=(
const file &) =
delete;
236 FMT_API long long size()
const;
268 #if (defined(LC_NUMERIC_MASK) || defined(_MSC_VER)) && \
269 !defined(__ANDROID__) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && \
270 !defined(__NEWLIB_H__)
279 typedef _locale_t locale_t;
281 enum { LC_NUMERIC_MASK = LC_NUMERIC };
283 static locale_t newlocale(
int category_mask,
const char *locale, locale_t) {
284 return _create_locale(category_mask, locale);
287 static void freelocale(locale_t locale) {
288 _free_locale(locale);
291 static double strtod_l(
const char *nptr,
char **endptr, _locale_t locale) {
292 return _strtod_l(nptr, endptr, locale);
298 Locale(
const Locale &) =
delete;
299 void operator=(
const Locale &) =
delete;
302 typedef locale_t Type;
304 Locale() : locale_(newlocale(LC_NUMERIC_MASK,
"C",
FMT_NULL)) {
306 FMT_THROW(system_error(errno,
"cannot create locale"));
308 ~Locale() { freelocale(locale_); }
310 Type
get()
const {
return locale_; }
314 double strtod(
const char *&str)
const {
316 double result = strtod_l(str, &
end, locale_);
324 #endif // FMT_POSIX_H_
basic_cstring_view(const std::basic_string< Char > &s)
file & operator=(file &&other)
auto end(const C &c) -> decltype(c.end())
basic_cstring_view(const Char *s)
void vprint(std::FILE *f, const text_style &ts, const S &format, basic_format_args< typename buffer_context< Char >::type > args)
#define FMT_END_NAMESPACE
basic_buffer< char > buffer
basic_cstring_view< wchar_t > wcstring_view
basic_cstring_view< char > cstring_view
format_arg_store< Context, Args... > make_format_args(const Args &... args)
const Char * c_str() const
void vprint(string_view format_str, format_args args)
#define FMT_BEGIN_NAMESPACE
buffered_file & operator=(buffered_file &&other)
void print(string_view format_str, const Args &... args)
std::shared_ptr< logger > get(const std::string &name)
void write(std::basic_ostream< Char > &os, basic_buffer< Char > &buf)