Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nlio(7) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nlio(1)

nlioenv(1)

nliostart(1)

nlioinit(1M)

ioctl(2)

pty(7)

termio(7)

NLIO(7)  —  HP-UX

NAME

nlio − Native Language I/O server

DESCRIPTION

The Native Language I/O server runs between the terminal device of an actual terminal and the master side of a pseudoterminal.  The Native Language I/O interface is available on the slave side of the pseudoterminal.  (See pty(7) for information on pseudoterminals.) All I/O to the terminal is performed through the server.

Several ioctl(2) requests are provided to control Native Language I/O on the terminal.  The ioctl(2) system call has the form:

#include <sys/ioctl.h>
#include <nlio.h>

int ioctl(fildes, request, arg)
int fildes, request;
char arg[NLIOREQLEN];

The include file <sys/ioctl.h> must be included before <nlio.h>. 

The buffer specified by arg must not be less than NLIOREQLEN bytes in length. 

Request can have the following values:

ISNLIO Check whether a Native Language I/O server is running for the device associated with fildes.  The buffer specified by arg is not used.  If the server is running, NLIOSERV is returned; otherwise, -1 is returned. 

NLIOGSERV Get the name of the server that is running for the terminal.  The name is returned to the buffer specified by arg.  The name is terminated with ’\0’. 

NLIOGTB Get the current terminal behavior.  The name of terminal behavior is returned to the buffer specified by arg. It is terminated with ’\0’.  If no terminal behavior is currently specified, only ’\0’ is returned.  This can occur if an unknown terminal behavior was previously specified. 

NLIOSTB Set terminal behavior.  The current terminal behavior is changed to the terminal behavior in the buffer specified by arg.  It must be terminated with ’\0’. 

NLIOGFLAGS Get the current values of the flags.  The byte flags are returned in the buffer specified by arg. If a particular flag is not available for the device, ’\0’ is returned in that flag’s buffer position.  Only the following flag is defined at this time:

arg[NLIO] This flag controls 16-bit data parsing and conversion, and has one of these values:

NLIO_I enable input parsing only

NLIO_O enable output conversion only

NLIO_IO
enable both input parsing and output conversion

NLIO_N enable neither of the above

NLIOSFLAGS Set flags.  See NLIOGFLAGS for description of the flags.  The current values of the flags are changed to the values passed in the buffer specified by arg.  If a flag value is ’\0’, it is ignored and that flag’s current value is not changed.  Clear the whole array of NLIOREQLEN flags with ’\0’ characters before setting the new values. 

RETURN VALUE

A value of NLIOSERV is returned if the Native Language I/O server is running for the device associated with fildes and no errors have occurred. 

If ioctl(2) is called with invalid arguments, a value of −1 is returned and errno is set as described in ioctl(2).

If a request error has occurred, a value of −1 is returned and errno is set to EINVAL. 

ERRORS

After a request error has occurred, the NLIOGERR request is available to determine what is wrong.  The form of this call is:

#include <sys/ioctl.h>
#include <nlio.h>

int ioctl(fildes, request, error)
int fildes, request;
int *error;

NLIOGERR Get the error code of the last unsuccessful request.  The error code is returned in the integer variable pointed to by error, and will be one of the following:

UNKNOWN_TB An unknown terminal behavior was passed. 

BAD_TB The terminal behavior requested was invalid or not appropriate. 

INVALID_FLAG The flags supplied with NLIOSFLAGS were invalid or unknown. 

TOO_LONG_NAME
The specified name was too long.

UNKNOWN_REQ An unknown nlio request was passed. 

WARNINGS

Do not set the tty special control characters such as INTR, ERASE, and KILL (see termio(7)) to ASCII characters with values in the range of ’\021’ to ’\0176’ inclusive for the terminal with which the Native Language I/O server is associated, because HP-15 can include these values as the second byte of a 16-bit character code. 

Clear the whole array of NLIOREQLEN bytes with ’\0’ characters before setting flags with NLIOSFLAGS, even if only one flag is used.  Otherwise, unexpected things can happen to the I/O. 

AUTHOR

Nlio was developed by HP. 

SEE ALSO

nlio(1), nlioenv(1), nliostart(1), nlioinit(1M), ioctl(2), pty(7), termio(7). 

INTERNATIONAL SUPPORT

8-bit and 16-bit data. 

Hewlett-Packard Company  —  May 11, 2021

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