No empty .Rs/.Re
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / vstring_vstream.h
blobad44d9eb34f93733ee0a2929db57f45e9420edf1
1 /* $NetBSD$ */
3 #ifndef _VSTRING_VSTREAM_H_INCLUDED_
4 #define _VSTRING_VSTREAM_H_INCLUDED_
6 /*++
7 /* NAME
8 /* vstring_vstream 3h
9 /* SUMMARY
10 /* auto-resizing string library
11 /* SYNOPSIS
12 /* #include <vstring_vstream.h>
13 /* DESCRIPTION
16 * Utility library.
18 #include <vstream.h>
19 #include <vstring.h>
22 * External interface.
24 extern int vstring_get(VSTRING *, VSTREAM *);
25 extern int vstring_get_nonl(VSTRING *, VSTREAM *);
26 extern int vstring_get_null(VSTRING *, VSTREAM *);
27 extern int vstring_get_bound(VSTRING *, VSTREAM *, ssize_t);
28 extern int vstring_get_nonl_bound(VSTRING *, VSTREAM *, ssize_t);
29 extern int vstring_get_null_bound(VSTRING *, VSTREAM *, ssize_t);
32 * Backwards compatibility for code that still uses the vstring_fgets()
33 * interface. Unfortunately we can't change the macro name to upper case.
35 #define vstring_fgets(s, p) \
36 (vstring_get((s), (p)) == VSTREAM_EOF ? 0 : (s))
37 #define vstring_fgets_nonl(s, p) \
38 (vstring_get_nonl((s), (p)) == VSTREAM_EOF ? 0 : (s))
39 #define vstring_fgets_null(s, p) \
40 (vstring_get_null((s), (p)) == VSTREAM_EOF ? 0 : (s))
41 #define vstring_fgets_bound(s, p, l) \
42 (vstring_get_bound((s), (p), (l)) == VSTREAM_EOF ? 0 : (s))
43 #define vstring_fgets_nonl_bound(s, p, l) \
44 (vstring_get_nonl_bound((s), (p), (l)) == VSTREAM_EOF ? 0 : (s))
46 /* LICENSE
47 /* .ad
48 /* .fi
49 /* The Secure Mailer license must be distributed with this software.
50 /* AUTHOR(S)
51 /* Wietse Venema
52 /* IBM T.J. Watson Research
53 /* P.O. Box 704
54 /* Yorktown Heights, NY 10598, USA
55 /*--*/
57 #endif