Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ htmp(VII) — UNIX 1BSD

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

htmp (V)

sethome (VI)

ttytype (VI)

HTMP(VII)  −  PWB/UNIX 9/24/77

NAME

htmp − routines for easily dealing with htmp data base

DESCRIPTION

This set of routines allows easy use of the htmp (V) data base and insulates programs from changes to its structure.  The routines all deal with the contents of one htmp structure which has the following form: struct htmp {
intuid;
charhome[28];
intttytype;
} hentry; The entry points defined are:

hget(tty)

int tty;
Get the entry for the tty specified from the data base and place it in hentry.  Returns 0 if success, -1 if failure.  If this call fails, perror (III) can be used to generate an appropriate diagnostic. 

hput(tty)

int tty;
Like hget but updates the entry for tty in the data base from hentry. 

char *

hgethome()
Returns a pointer to the home directory entry for hentry. 

hsethome(cp)

char *cp;
Sets the home directory entry in hentry to be the string pointed to by cp.  This string will be truncated if it is too long. 

hgetuid()
Returns the uid from hentry. 

hsetuid(uid)

int uid;
Sets the uid in hentry to be uid. 

hgettype()
Returns the ttytype from hentry. 

char *

hsgettype()
Returns a pointer to the type as a string. The pointer is in a static place and must be saved if hsgettype is to be called again. 

hsettype(type)

int type;
Sets the ttytype in hentry to be type. 

FILES

/etc/htmphtmp data base

SEE ALSO

htmp (V), sethome (VI), ttytype (VI)

AUTHOR

William Joy

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