HP UX 11i v1 I/O Cards manual Makezluname, TTY Name Returned Name Comment, MYZLU01

Models: UX 11i v1 I/O Cards

1 298
Download 298 pages 31.75 Kb
Page 150
Image 150

ZCOM C I/F Library Routines

MAKEZLUNAME (3X)

 

MAKEZLUNAME (3X)

NAME

makezluname – Make a ZLU name with TTY name suffix

SYNOPSIS

#include <zcom/zcomsys.h>

#include <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */

char *makezluname (name) char *name;

DESCRIPTION Routine makezluname constructs a ZLU name by merging the user-supplied name with the TTY suffix. The returned name is 7 characters long plus a terminating ’\0’. This name may be provided in a call to zopen to open or create a program ZLU with a name that is associated with the TTY of the calling process. Note that the zopen call assigns a label (name) to each program ZLU and does allow two program ZLUs to be created with the same name. This allows a program to be run from different terminals without referring to the same program ZLU.

This routine calls ttyname to retrieve the TTY name of the current process. From the returned TTY name, the prefix “tty” is stripped and then appended to the user-supplied name to form a ZLU name. Note that part of the user-supplied name and TTY name may be truncated to ensure that the returned ZLU name fits in an 8-byte buffer.

For example, if the specified name is “MYZLU”, the following shows the returned ZLU name for different terminals.

TTY Name

Returned Name

Comment

 

 

 

tty01

MYZLU01

Only TTY suffix is used.

tty0p1

MYZL0p1

“U” is dropped to fix TTY suffix.

tty04p12

MY04p12

Maximum of 5 characters from TTY suffix.

tty04p12i

MY4p12i

Only 5 of 6 characters from TTY suffix.

term

MYZterm

Full TTY name is used.

console

MYnsole

Trailing part of TTY name is used.

150

Chapter 4

Page 150
Image 150
HP UX 11i v1 I/O Cards manual Makezluname, TTY Name Returned Name Comment, MYZLU01