Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / rec2stream.c
blob689a9ec2890c17919b197ac77d5c1d95054e4efd
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* rec2stream 1
6 /* SUMMARY
7 /* convert record stream to stream-lf format
8 /* SYNOPSIS
9 /* rec2stream
10 /* DESCRIPTION
11 /* rec2stream reads a record stream from standard input and
12 /* writes the content to standard output in stream-lf format.
13 /* DIAGNOSTICS
14 /* Problems are reported to the standard error stream.
15 /* LICENSE
16 /* .ad
17 /* .fi
18 /* The Secure Mailer license must be distributed with this software.
19 /* AUTHOR(S)
20 /* Wietse Venema
21 /* IBM T.J. Watson Research
22 /* P.O. Box 704
23 /* Yorktown Heights, NY 10598, USA
24 /*--*/
26 /* System library. */
28 #include <sys_defs.h>
30 /* Utility library. */
32 #include <vstring.h>
33 #include <vstream.h>
35 /* Global library. */
37 #include <record.h>
38 #include <rec_streamlf.h>
40 int main(void)
42 VSTRING *buf = vstring_alloc(100);
43 int type;
45 while ((type = rec_get(VSTREAM_IN, buf, 0)) > 0)
46 REC_STREAMLF_PUT_BUF(VSTREAM_OUT, type, buf);
47 vstream_fflush(VSTREAM_OUT);
48 return (0);