home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- *
- * NAME: strpool.h
- *
- * DESCRIPTION: data structs etc for "string pool" type
- *
- * M O D I F I C A T I O N H I S T O R Y
- *
- * when who what
- * -------------------------------------------------------------------
- * 04/10/90 J. Alan Eldridge created
- *
- *********************************************************************/
-
- #ifndef __STRBUF_H__
- #define __STRBUF_H__
-
- struct strbuf {
- int size;
- int free;
- char buf[8];
- };
-
- typedef struct {
- int nbufs;
- struct strbuf *bufs[1];
- } STRPOOL;
-
- typedef int STRADDR [2];
-
- #ifndef NO_PROTO
-
- STRPOOL *strpool_new(
- int nbufs,
- int bsize);
-
- void strpool_free(STRPOOL *p);
-
- int strpool_put(
- STRPOOL *p,
- int bcnt,
- char *bytes,
- STRADDR addr);
-
- char *strpool_get(
- STRPOOL *p,
- STRADDR addr,
- int *bcnt);
-
- #endif
-
- #endif /* __STRBUF_H__ */
-
-