Annotation of 43BSDReno/usr.bin/make/buf.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
                      3:  * Copyright (c) 1988, 1989 by Adam de Boor
                      4:  * Copyright (c) 1989 by Berkeley Softworks
                      5:  * All rights reserved.
                      6:  *
                      7:  * This code is derived from software contributed to Berkeley by
                      8:  * Adam de Boor.
                      9:  *
                     10:  * Redistribution and use in source and binary forms are permitted
                     11:  * provided that: (1) source distributions retain this entire copyright
                     12:  * notice and comment, and (2) distributions including binaries display
                     13:  * the following acknowledgement:  ``This product includes software
                     14:  * developed by the University of California, Berkeley and its contributors''
                     15:  * in the documentation or other materials provided with the distribution
                     16:  * and in all advertising materials mentioning features or use of this
                     17:  * software. Neither the name of the University nor the names of its
                     18:  * contributors may be used to endorse or promote products derived
                     19:  * from this software without specific prior written permission.
                     20:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
                     21:  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
                     22:  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
                     23:  *
                     24:  *     @(#)buf.h       5.3 (Berkeley) 6/1/90
                     25:  */
                     26: 
                     27: /*-
                     28:  * buf.h --
                     29:  *     Header for users of the buf library.
                     30:  */
                     31: 
                     32: #ifndef _BUF_H
                     33: #define _BUF_H
                     34: 
                     35: #include    "sprite.h"
                     36: 
                     37: typedef struct Buffer *Buffer;
                     38: typedef unsigned char Byte;
                     39: 
                     40: Buffer           Buf_Init();       /* Initialize a buffer */
                     41: void             Buf_Destroy();    /* Destroy a buffer */
                     42: void             Buf_AddByte();    /* Add a single byte to a buffer */
                     43: void             Buf_AddBytes();   /* Add a range of bytes to a buffer */
                     44: int              Buf_GetByte();    /* Get a byte from a buffer */
                     45: int              Buf_GetBytes();   /* Get multiple bytes */
                     46: void             Buf_UngetByte();  /* Push a byte back into the buffer */
                     47: void             Buf_UngetBytes(); /* Push many bytes back into the buf */
                     48: Byte             *Buf_GetAll();    /* Get them all */
                     49: void             Buf_Discard();    /* Throw away some of the bytes */
                     50: int              Buf_Size();       /* See how many are there */
                     51: 
                     52: #define BUF_ERROR 256
                     53: 
                     54: #endif _BUF_H

unix.superglobalmegacorp.com

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