Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ environ(5) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

env(1)

login(1)

sh(1)

exec(2)

catopen(3C)

ctime(3C)

getenv(3C)

nl_init(3C)

profile(4)

langid(5)

term(5)

tztab(4)

ENVIRON(5)  —  HP-UX

NAME

environ − user environment

DESCRIPTION

An array of strings called the "environment" is made available by exec(2) when a process begins. By convention, these strings have the form "name=value". The following names are used by various commands:

PATH PATH indicates the sequence of directory prefixes that sh(1), time(1), nice(1), nohup(1), etc., search when looking for a file known by an incomplete path name. Prefixes are separated by colons (:). Login(1) sets PATH=:/bin:/usr/bin.

HOME HOME is the name of the user’s login directory, set by login(1) from the password file (see passwd(4)).

TERM TERM identifies the kind of terminal for which output is to be prepared.  This information is used by commands, such as mm(1) or tplot(1), that can exploit special capabilities of that terminal.

TZ TZ sets time zone information.  The minimum format is tznamediff, where tzname is an "alphabetic" string giving the time-zone name or abbreviation, and diff is the difference in hours from GMT.  Diff may be positive (west of Greenwich) or negative (east of Greenwich).  Fractional hours are indicated as minutes preceded by a colon.  If a summer time-zone adjustment (such as for Daylight Savings Time in the USA) is to be applied, the format is tznamediffdstzname, where dstzname is the name of the "Daylight Savings" time zone.  The entire string is compared to entries in the tztab file for time zone adjustment information (see tztab(4)).

LANG LANG identifies the user’s requirements for native language, local customs and coded character set, in the form:

LANG=language[_territory[.codeset]]

  Values of LANG are given in English as an ASCII character string and should be one of the NLS environment names, as defined in langid(5). At runtime, the user’s language requirements, as specified by LANG, are bound to the execution of a program by calling nl_init (see nl_init(3C)). For example:

nl_init( getenv("LANG") );

LANGOPTS Defines language options for mode, data order and alternative digits, in the form:

LANGOPTS=[mode][_order][.outdigit]

  Values of LANGOPTS are given in English as an ASCII character string.  The mode describes the mode of a file where l (ell) represents Latin mode and n represents non-Latin mode.  Non-Latin mode is assumed for values other than l and n.  The order describes the data order of a file where k is keyboard order and s is screen order.  The outdigit describes the kind of digits used for output where a designates ASCII digits and l designates alternative digits. 

NLSPATH NLSPATH contains a sequence of pseudo-path names that catopen(3C) uses when attempting to locate message catalogues. Each pseudo-path name contains a name template consisting of an optional path prefix, one or more substitution field descriptors, a file name and an optional file name suffix. For example:

NLSPATH="/system/nlslib/%N.cat"

  instructs catopen(3C) to look for all message catalogues in the directory /system/nlslib, where the catalogue name is constructed from the name parameter passed to catopen (%N) and the suffix ".cat". 

  Field descriptors consist of a % preceding a single character.  NLSPATH recognizes the following field descriptors and substitution values:

%N The value of the "name" parameter passed to catopen(3C). 

%L The value of LANG. 

%l The language element from LANG. 

%t The territory element from LANG. 

%c The codeset element from LANG. 

%% Replaced by a single %. 

  A null string is substituted if the specified value is not defined.  Separators are not included in %t and %c substitutions. 

  Path names defined in NLSPATH are separated by colons (:).  A leading colon or two adjacent colons (::) indicates the current directory.  For example:

NLSPATH=":%N.cat:/nlslib/%L/%N.cat"

  tells catopen(3C) to look for the requested message catalogue in name, name.cat and /nlslib/$LANG/name.cat. 

  A default psuedo-path name defined by the system is effectively appended to NLSPATH and used by catopen(3C) whenever a message catalogue cannot be opened in any of the user defined psuedo-path names.  This systemwide default path is:

/usr/lib/nls/%L/%N.cat

Further names may be placed in the environment by the export command and "name=value" arguments in sh(1), or by exec(2). It is unwise to conflict with the following shell variables frequently exported by .profile files: MAIL, PS1, PS2 and IFS. 

The environment of a process is accessible from C by using the global variable:

char ∗∗environ;

which points to an array of pointers to the strings that comprise the environment.  The array is terminated by a null pointer. 

WARNINGS

The LANG and LANGOPTS environment variables are not used by all HP-UX commands and library routines.  Message catalogues are not defined for some commands, and thus NLSPATH does not affect their behavior.  See the INTERNATIONAL SUPPORT section of specific commands and library routines for implementation details. 

DEPENDENCIES

Series 500
The environment string NLSPATH is currently not supported. 

Series 500, 800
The LANGOPTS environment variable is not supported. 

AUTHOR

Environ was developed by AT&T and HP. 

SEE ALSO

env(1), login(1), sh(1), exec(2), catopen(3C), ctime(3C), getenv(3C), nl_init(3C), profile(4), langid(5), term(5), tztab(4). 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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