# 2.11BSD#431 - /usr/src/ucb/finger/finger.h

##### Variables

    entries           X
    htab              X
    phead             X
    ptail             X

##### Macros

    HBITS             X
    HMASK             X
    HSIZE             X

##### struct's

    person            X
    where             X

##### enums's

    status            X

##### typedef's

    PERSON            X
    WHERE             X

       1: /*
       2:  * Copyright (c) 1989 The Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * This code is derived from software contributed to Berkeley by
       6:  * Tony Nardo.
       7:  *
       8:  * Redistribution and use in source and binary forms are permitted
       9:  * provided that the above copyright notice and this paragraph are
      10:  * duplicated in all such forms and that any documentation,
      11:  * advertising materials, and other materials related to such
      12:  * distribution and use acknowledge that the software was developed
      13:  * by the University of California, Berkeley.  The name of the
      14:  * University may not be used to endorse or promote products derived
      15:  * from this software without specific prior written permission.
      16:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
      17:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
      18:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
      19:  *
      20:  *	@(#)finger.h	5.4 (Berkeley) 2/7/90
      21:  */
      22:
      23: #include <pwd.h>
      24: #include <utmp.h>
      25:
      26: /*
      27:  * All unique persons are linked in a list headed by "head" and linkd
      28:  * by the "next" field, as well as kept in a hash table.
      29:  */
      30:
      31: typedef struct person {
      32:     struct person *next;        /* link to next person */
      33:     struct person *hlink;       /* link to next person in hash bucket */
      34:     uid_t uid;          /* user id */
      35:     char *dir;          /* user's home directory */
      36:     char *homephone;        /* pointer to home phone no. */
      37:     char *name;         /* login name */
      38:     char *office;           /* pointer to office name */
      39:     char *officephone;      /* pointer to office phone no. */
      40:     char *realname;         /* pointer to full name */
      41:     char *shell;            /* user's shell */
      42:     struct where *whead, *wtail;    /* list of where he is or has been */
      43: } PERSON;
      44:
      45: enum status { LASTLOG, LOGGEDIN };
      46:
      47: typedef struct where {
      48:     struct where *next;     /* next place he is or has been */
      49:     enum status info;       /* type/status of request */
      50:     short writable;         /* tty is writable */
      51:     time_t loginat;         /* time of (last) login */
      52:     time_t idletime;        /* how long idle (if logged in) */
      53:     char tty[UT_LINESIZE+1];    /* null terminated tty line */
      54:     char host[UT_HOSTSIZE+1];   /* null terminated remote host name */
      55: } WHERE;
      56:
      57: #define HBITS   8           /* number of bits in hash code */
      58: #define HSIZE   (1 << 8)        /* hash table size */
      59: #define HMASK   (HSIZE - 1)     /* hash code mask */
      60:
      61: PERSON *htab[HSIZE];            /* the buckets */
      62: PERSON *phead, *ptail;          /* the linked list of all people */
      63:
      64: int entries;                /* number of people */
      65:
      66: PERSON *enter_person(), *find_person(), *palloc();
      67: WHERE *walloc();
      68:
      69: extern char tbuf[1024];         /* temp buffer for anybody */

#### Defined variables

entries defined in line 64; used 8 times

- in /usr/src/ucb/finger/finger.c line 96, 108, 205-209(2)
- in /usr/src/ucb/finger/sprint.c line 61, 110, 116
- in /usr/src/ucb/finger/util.c line 200

htab defined in line 61; used 2 times

- in /usr/src/ucb/finger/util.c line 194, 223

phead defined in line 62; used 6 times

- in /usr/src/ucb/finger/finger.c line 140, 227
- in /usr/src/ucb/finger/lprint.c line 45
- in /usr/src/ucb/finger/sprint.c line 114
- in /usr/src/ucb/finger/util.c line 201-202(2)

ptail defined in line 62; used 3 times

- in /usr/src/ucb/finger/util.c line 202-205(3)

#### Defined struct's

person defined in line 31; used 4 times

- in line 32-33(4)

where defined in line 47; used 3 times

- in line 42, 48(2)

#### Defined enum's

status defined in line 45; used 2 times

- in line 49(2)

#### Defined typedef's

PERSON defined in line 43; used 29 times

- in line 61-66(3)
- in /usr/src/ucb/finger/finger.c line 119, 149-150(2)
- in /usr/src/ucb/finger/lprint.c line 43, 59
- in /usr/src/ucb/finger/sprint.c line 36-40(2), 102-110(5), 116-121(2)
- in /usr/src/ucb/finger/util.c line 55, 124, 175, 188-192(2), 216-220(2), 242-247(4), 256

WHERE defined in line 55; used 11 times

- in line 67
- in /usr/src/ucb/finger/lprint.c line 63
- in /usr/src/ucb/finger/sprint.c line 37, 127
- in /usr/src/ucb/finger/util.c line 36, 126, 177, 254-260(4)

#### Defined macros

HBITS defined in line 57; used 1 times

- in /usr/src/ucb/finger/util.c line 238

HMASK defined in line 59; used 1 times

- in /usr/src/ucb/finger/util.c line 238

HSIZE defined in line 58; used 2 times

- in line 59-61(2)

#### Usage of this include

finger.h used 4 times

- in /usr/src/ucb/finger/finger.c line 47
- in /usr/src/ucb/finger/lprint.c line 32
- in /usr/src/ucb/finger/sprint.c line 29
- in /usr/src/ucb/finger/util.c line 32

Last modified: 1990-03-18 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1068 |