Annotation of 43BSDTahoe/new/mkmf/src/slist.h, revision 1.1

1.1     ! root        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 */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.