gmio_core: move gmio_check_lc_numeric() into internal/error_check.h

This commit is contained in:
Hugues Delorme 2016-11-02 11:53:48 +01:00
parent 1168ef04ed
commit 07d7dd75be
6 changed files with 13 additions and 13 deletions

View File

@ -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);
}

View File

@ -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 */

View File

@ -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()

View File

@ -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();

View File

@ -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"

View File

@ -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"