Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
GETTTYEN.3
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 3k
Category:
OS Develop
Development Platform:
WINDOWS
- GETTTYENT(3) Minix Programmer's Manual GETTTYENT(3)
- NAME
- getttyent, getttynam, setttyent, endttyent - interface to /etc/ttytab
- SYNOPSIS
- #include <ttyent.h>
- struct ttyent *getttyent(void)
- struct ttyent *getttynam(const char *name)
- int setttyent(void)
- void endttyent(void)
- DESCRIPTION
- The getttyent functions provide an interface to the /etc/ttytab. (See
- ttytab(5)).
- To read one of these files one calls getttyent() several times to read
- the entries in the table until NULL is returned for end-of-file.
- Getttyname() searches the ttytab file for the given terminal device. It
- is equivalent to a call to setttyent(), several calls to getttyent() to
- locate the entry, and a final endttyent() to close the file.
- Setttyent() opens or rewinds the ttytab database, and endttyent() closes
- it. Getttyent() opens the database if not already open, but does not
- close it.
- The struct ttyent is defined by <ttyent.h> as follows:
- struct ttyent {
- char *ty_name; /* Name of the terminal device. */
- char *ty_type; /* Terminal type name (termcap(3)). */
- char **ty_getty; /* Program to run, normally getty. */
- char **ty_init; /* Initialization command, normally stty. */
- };
- A valid entry has at least two strings, so both ty_name and ty_type are
- filled in. The optional ty_getty and ty_init may be NULL (field
- omitted), point to a pointer that is NULL (null lenght field, i.e. ""),
- or an array of strings terminated by a NULL (field present). For now no
- useful distinction can be made between a omitted field and an empty
- field, so treat both cases as an omission.
- FILES
- /etc/ttytab The terminal device database
- 1
- GETTTYENT(3) Minix Programmer's Manual GETTTYENT(3)
- SEE ALSO
- ttyname(3), ttyslot(3), ttytab(5), init(8).
- DIAGNOSTICS
- Setttyent() has the same return value and error codes as the open(2) call
- it uses to open the ttytab file. The getxxx() functions return NULL on
- end of file, entry not found, or error. You can set errno to zero before
- the call and check it after.
- NOTES
- Getttyent() and getttynam() return a pointer to static storage that is
- overwritten in each call.
- The Minix struct ttyent has only the ty_name and ty_type fields in common
- with the BSD implementation. This does not seem to be a problem, because
- most third party software that need to know about terminals only look at
- the ty_name field.
- AUTHOR
- Kees J. Bot (kjb@cs.vu.nl)
- 2