sbuf.h (88950) | sbuf.h (89121) |
---|---|
1/*- 2 * Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/sys/sbuf.h 88950 2002-01-06 08:38:23Z kbyanc $ | 28 * $FreeBSD: head/sys/sys/sbuf.h 89121 2002-01-09 07:29:28Z kbyanc $ |
29 */ 30 31#ifndef _SYS_SBUF_H_ | 29 */ 30 31#ifndef _SYS_SBUF_H_ |
32#define _SYS_SBUF_H_ | 32#define _SYS_SBUF_H_ |
33 34#include <machine/ansi.h> 35 36/* 37 * Structure definition 38 */ 39struct sbuf { 40 char *s_buf; /* storage buffer */ 41 void *s_unused; /* binary compatibility. */ 42 int s_size; /* size of storage buffer */ 43 int s_len; /* current length of string */ 44#define SBUF_FIXEDLEN 0x00000000 /* fixed length buffer (default) */ | 33 34#include <machine/ansi.h> 35 36/* 37 * Structure definition 38 */ 39struct sbuf { 40 char *s_buf; /* storage buffer */ 41 void *s_unused; /* binary compatibility. */ 42 int s_size; /* size of storage buffer */ 43 int s_len; /* current length of string */ 44#define SBUF_FIXEDLEN 0x00000000 /* fixed length buffer (default) */ |
45#define SBUF_AUTOEXTEND 0x00000001 /* automatically extend buffer */ | 45#define SBUF_AUTOEXTEND 0x00000001 /* automatically extend buffer */ |
46#define SBUF_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ | 46#define SBUF_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ |
47#define SBUF_DYNAMIC 0x00010000 /* s_buf must be freed */ 48#define SBUF_FINISHED 0x00020000 /* set by sbuf_finish() */ 49#define SBUF_OVERFLOWED 0x00040000 /* sbuf overflowed */ 50#define SBUF_DYNSTRUCT 0x00080000 /* sbuf must be freed */ | 47#define SBUF_DYNAMIC 0x00010000 /* s_buf must be freed */ 48#define SBUF_FINISHED 0x00020000 /* set by sbuf_finish() */ 49#define SBUF_OVERFLOWED 0x00040000 /* sbuf overflowed */ 50#define SBUF_DYNSTRUCT 0x00080000 /* sbuf must be freed */ |
51 int s_flags; /* flags */ 52}; 53 54__BEGIN_DECLS 55/* 56 * API functions 57 */ 58struct sbuf *sbuf_new(struct sbuf *, char *, int, int); --- 25 unchanged lines hidden --- | 51 int s_flags; /* flags */ 52}; 53 54__BEGIN_DECLS 55/* 56 * API functions 57 */ 58struct sbuf *sbuf_new(struct sbuf *, char *, int, int); --- 25 unchanged lines hidden --- |