Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ NLgetfile(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getenv, NLgetenv

NLgetctab

environment

NLgetfile

Purpose

     Gets parameter file for international character support.

Syntax

     NLgetfile (filename)
     char *filename;

Description

     The NLgetfile subroutine  lets an application temporarily
     change  the  NLFILE  environment parameters  and  thereby
     select  the current  "language."   The NLFILE  parameters
     establish   environment   settings   appropriate   to   a
     "language" or dialect for the work station.

     The  filename is  either NULL  or points  to a  character
     string containing  the name  of an environment  file that
     should contain definitions in a format required by NLFILE
     to provide international character support:

     o   If filename is  NULL, international character support
         is reset to its default.  In this mode NLgetenv seeks
         a  definition of  an international  character support
         environmental variable, first in the process environ-
         ment and then  in the file specified  by the environ-
         ment variable  NLFILE.  If no definition  is found, a
         default value is returned.

     o   If filename is  the name of an  environment file, the
         international character support environment variables
         defined in the  file are used instead  of those given
         in  the  process  environment.  Neither  the  process
         environment  nor the  file  specified  by NLFILE  are
         used; if  an environment  variable is not  defined in
         filename then  a default  value is returned.   A NULL
         value is returned when no default value exists.

     When  it succeeds,  NLgetfile always  calls NLgetctab  to
     change the the current  collating tables.  NLgetctab must
     be called after NLgetfile to change the current collating
     table if different tables are desired.

Return Value

     When NLgetfile succeeds, 0 is returned.

     When NLgetfile does not succeed, -1 is returned and errno
     is set to indicate the error.  NLgetfile does not succeed
     when:

         A non-NULL filename  is given and the  file cannot be
         opened or read, or
         A NULL  filename is supplied and  the NLFILE environ-
         ment variable cannot be opened or read.

Related Information

     In  this  book:   "getenv, NLgetenv,"  "NLgetctab,"  and
     "environment."

     "Overview of International Character Support" in Managing
     the AIX Operating System.

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