brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · e4d7536 Raw
50 lines · cpp
1//===-- Implementation of localeconv --------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "src/locale/localeconv.h"10 11#include "src/__support/CPP/limits.h"12#include "src/__support/common.h"13#include "src/__support/macros/config.h"14 15namespace LIBC_NAMESPACE_DECL {16 17static char DOT_STRING[] = ".";18static char EMPTY_STRING[] = "";19 20static struct lconv C_LCONV = {21    .decimal_point = DOT_STRING,22    .thousands_sep = EMPTY_STRING,23    .grouping = EMPTY_STRING,24    .mon_decimal_point = EMPTY_STRING,25    .mon_thousands_sep = EMPTY_STRING,26    .mon_grouping = EMPTY_STRING,27    .positive_sign = EMPTY_STRING,28    .negative_sign = EMPTY_STRING,29    .currency_symbol = EMPTY_STRING,30    .frac_digits = CHAR_MAX,31    .p_cs_precedes = CHAR_MAX,32    .n_cs_precedes = CHAR_MAX,33    .p_sep_by_space = CHAR_MAX,34    .n_sep_by_space = CHAR_MAX,35    .p_sign_posn = CHAR_MAX,36    .n_sign_posn = CHAR_MAX,37    .int_curr_symbol = EMPTY_STRING,38    .int_frac_digits = CHAR_MAX,39    .int_p_cs_precedes = CHAR_MAX,40    .int_n_cs_precedes = CHAR_MAX,41    .int_p_sep_by_space = CHAR_MAX,42    .int_n_sep_by_space = CHAR_MAX,43    .int_p_sign_posn = CHAR_MAX,44    .int_n_sign_posn = CHAR_MAX,45};46 47LLVM_LIBC_FUNCTION(struct lconv *, localeconv, ()) { return &C_LCONV; }48 49} // namespace LIBC_NAMESPACE_DECL50