Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nl_langinfo(3) — OSF/1 1.0 (TIN) MIPS

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setlocale(3)

nl_langinfo(3)  —  Subroutines

OSF

NAME

nl_langinfo −  Language information

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <nl_types.h>
#include <langinfo.h> char ∗nl_langinfo (
nl_item item ); char ∗nl_langinfo_r (
nl_item item ,
char ∗buf,
int len );

PARAMETERS

itemSpecifies constant names and values. 

bufPoints to a string containing the requested information. 

lenSpecifies the length of buf. 

DESCRIPTION

The nl_langinfo() function returns a pointer to a string containing information relevant to the particular language or cultural area defined in the program’s locale.  The manifest, constant names and values of the item parameter are defined in the langinfo.h header file. 

The nl_langinfo_r() function is the reentrant version of nl_langinfo(). 

NOTES

AES Support Level:
Trial use (nl_langinfo())

EXAMPLE

For example, the following returns a pointer to the abbreviated name of the first day of the week in the current locale:

nl_langinfo(ABDAY_1)

This function call would return a pointer to the string “Dom” if the identified language was Portuguese, “Sun” if the identified language was English, and so on. 

RETURN VALUES

In a locale where langinfo data is not defined, the nl_langinfo() function returns a pointer to the corresponding string in the C locale.  In all locales, the nl_langinfo() function returns a pointer to an empty string if the item parameter contains an invalid setting. 

Upon successful completion, the nl_langinfo_r() function returns a value of 0 (zero) and places the requested information in buf.  Otherwise, -1 is returned and errno is set to indicate the error. 

ERRORS

If the nl_langinfo_r() function fails, errno may be set to the following value:

[EINVAL]The item parameter is invalid. 

RELATED INFORMATION

Functions: setlocale(3)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026