gmio_core: move gmio_check_lc_numeric() into internal/error_check.h
This commit is contained in:
parent
1168ef04ed
commit
07d7dd75be
@ -29,6 +29,7 @@
|
||||
|
||||
#include "error_check.h"
|
||||
|
||||
#include "locale_utils.h"
|
||||
#include "../error.h"
|
||||
#include "../memblock.h"
|
||||
|
||||
@ -48,3 +49,10 @@ bool gmio_check_memblock_size(
|
||||
*error = GMIO_ERROR_INVALID_MEMBLOCK_SIZE;
|
||||
return gmio_no_error(*error);
|
||||
}
|
||||
|
||||
bool gmio_check_lc_numeric(int *error)
|
||||
{
|
||||
if (!gmio_lc_numeric_is_C())
|
||||
*error = GMIO_ERROR_BAD_LC_NUMERIC;
|
||||
return gmio_no_error(*error);
|
||||
}
|
||||
|
@ -39,4 +39,8 @@ bool gmio_check_memblock(
|
||||
bool gmio_check_memblock_size(
|
||||
int* error, const struct gmio_memblock* mblock, size_t minsize);
|
||||
|
||||
/*! Checks gmio_lc_numeric_is_C(), if false sets \p *error to
|
||||
* \c GMIO_ERROR_BAD_LC_NUMERIC*/
|
||||
bool gmio_check_lc_numeric(int* error);
|
||||
|
||||
#endif /* GMIO_INTERNAL_ERROR_CHECK_H */
|
||||
|
@ -49,13 +49,6 @@ bool gmio_lc_numeric_is_C()
|
||||
|| gmio_ascii_stricmp(lc, "POSIX") == 0);
|
||||
}
|
||||
|
||||
bool gmio_check_lc_numeric(int *error)
|
||||
{
|
||||
if (!gmio_lc_numeric_is_C())
|
||||
*error = GMIO_ERROR_BAD_LC_NUMERIC;
|
||||
return gmio_no_error(*error);
|
||||
}
|
||||
|
||||
static char global_lc_numeric[64] = {0};
|
||||
|
||||
void gmio_lc_numeric_save()
|
||||
|
@ -34,9 +34,5 @@ const char* gmio_lc_numeric();
|
||||
/*! Returns result of case-insensitive test <tt>LC_NUMERIC == "C|POSIX"</tt> */
|
||||
bool gmio_lc_numeric_is_C();
|
||||
|
||||
/*! Checks gmio_lc_numeric_is_C(), if false sets \p *error to
|
||||
* \c GMIO_ERROR_BAD_LC_NUMERIC*/
|
||||
bool gmio_check_lc_numeric(int* error);
|
||||
|
||||
void gmio_lc_numeric_save();
|
||||
void gmio_lc_numeric_restore();
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "../../gmio_core/internal/helper_memblock.h"
|
||||
#include "../../gmio_core/internal/helper_stream.h"
|
||||
#include "../../gmio_core/internal/helper_task_iface.h"
|
||||
#include "../../gmio_core/internal/locale_utils.h"
|
||||
#include "../../gmio_core/internal/min_max.h"
|
||||
#include "../../gmio_core/internal/safe_cast.h"
|
||||
|
||||
|
@ -37,10 +37,10 @@
|
||||
|
||||
#include "../gmio_core/error.h"
|
||||
#include "../gmio_core/internal/c99_stdio_compat.h"
|
||||
#include "../gmio_core/internal/error_check.h"
|
||||
#include "../gmio_core/internal/helper_memblock.h"
|
||||
#include "../gmio_core/internal/helper_stream.h"
|
||||
#include "../gmio_core/internal/helper_task_iface.h"
|
||||
#include "../gmio_core/internal/locale_utils.h"
|
||||
#include "../gmio_core/internal/min_max.h"
|
||||
#include "../gmio_core/internal/safe_cast.h"
|
||||
#include "../gmio_core/internal/stringstream.h"
|
||||
|
Loading…
Reference in New Issue
Block a user