Embedded Artistry Framework
Embedded Systems C++ Framework
Functions | Variables
langinfo.c File Reference
#include <assert.h>
#include <langinfo.h>
#include <locale.h>
#include <stdint.h>
Include dependency graph for langinfo.c:

Functions

char * nl_langinfo (nl_item item)
 The nl_langinfo function can be used to access individual elements of the locale categories. More...
 

Variables

static const char c_time []
 
static const char c_messages []
 
static const char c_numeric []
 

Function Documentation

◆ nl_langinfo()

char* nl_langinfo ( nl_item  item)

The nl_langinfo function can be used to access individual elements of the locale categories.

Unlike the localeconv function, which returns all the information, nl_langinfo lets the caller select what information it requires. This is very fast and it is not a problem to call this function multiple times.

A second advantage is that in addition to the numeric and monetary formatting information, information from the LC_TIME and LC_MESSAGES categories is available.

The type item is defined in nl_types.h. The argument item is a numeric value defined in this header.

References assert, c_messages, c_numeric, c_time, CODESET, LC_ALL, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, and LC_TIME.

Referenced by asctime_r().

Here is the caller graph for this function:

Variable Documentation

◆ c_messages

const char c_messages[]
static
Initial value:
= "^[yY]\0"
"^[nN]\0"
"yes\0"
"no"

Referenced by nl_langinfo().

◆ c_numeric

const char c_numeric[]
static
Initial value:
= ".\0"
""

Referenced by nl_langinfo().

◆ c_time

const char c_time[]
static

Referenced by nl_langinfo().