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 | ||
| |||
| 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 | ||
| part of the | ||
| ensure that the returned ZLU name fits in an | ||
| For example, if the specified name is “MYZLU”, the following shows the | ||
| returned ZLU name for different terminals. | ||
|
|
|
|
| TTY | Returned | Comment |
| Name | Name | |
|
| ||
|
|
|
|
| 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. |
Chapter 4 | 159 |