1: /* $Header: slist.h,v 1.1 85/03/14 15:33:33 nicklin Exp $ */
   2: 
   3: /*
   4:  * Singly-linked list definitions
   5:  *
   6:  * Author: Peter J. Nicklin
   7:  */
   8: 
   9: /*
  10:  * Singly-linked list macros
  11:  */
  12: #define SLNUM(slist)    (slist)->nk
  13: /*
  14:  * Singly-linked list block
  15:  */
  16: typedef struct slblk
  17:     {
  18:     char *key;          /* points to a key */
  19:     struct slblk *next;     /* ptr to next list block */
  20:     } SLBLK;
  21: /*
  22:  * Singly-linked list head block
  23:  */
  24: typedef struct slisthb
  25:     {
  26:     int nk;             /* number of keys in list */
  27:     int maxkey;         /* length of longest key */
  28:     SLBLK *head;            /* pointer to first list block */
  29:     SLBLK *curblk;          /* pointer to current block */
  30:     SLBLK *tail;            /* pointer to last list block */
  31:     } SLIST;
  32: /*
  33:  * Functions defined for singly-linked list operations
  34:  */
  35: extern char *slappend();        /* append key */
  36: extern char *slget();           /* get next key */
  37: extern SLIST *slinit();         /* initialize list */
  38: extern char *slinsert();        /* insert key */
  39: extern int slpop();         /* pop key */
  40: extern char *slprepend();       /* prepend key */
  41: extern void slprint();          /* print list */
  42: extern void slrewind();         /* rewind list */
  43: extern void slrm();         /* remove list item */
  44: extern int slsort();            /* sort list */
  45: extern void slsplice();         /* splice two lists */

Defined struct's

slblk defined in line 16; used 2 times
  • in line 19(2)
slisthb defined in line 24; never used

Defined typedef's

Defined macros

SLNUM defined in line 12; used 2 times

Usage of this include

Last modified: 1985-07-03
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 941
Valid CSS Valid XHTML 1.0 Strict