all repos — mgba @ c14da05d8dca225010677643c32fea5c0ac8517a

mGBA Game Boy Advance Emulator

src/util/formatting.h (view raw)

 1/* Copyright (c) 2013-2015 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef FORMATTING_H
 7#define FORMATTING_H
 8
 9#include "util/common.h"
10
11#include "locale.h"
12
13#if defined(__APPLE__) || defined(__FreeBSD__)
14#include "xlocale.h"
15#endif
16
17#ifndef HAVE_LOCALE
18typedef const char* locale_t;
19#endif
20
21int ftostr_l(char* restrict str, size_t size, float f, locale_t locale);
22
23#ifndef HAVE_STRTOF_L
24float strtof_l(const char* restrict str, char** restrict end, locale_t locale);
25#endif
26
27int ftostr_u(char* restrict str, size_t size, float f);
28float strtof_u(const char* restrict str, char** restrict end);
29
30#endif