Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
stream2rec.c
[詳解]
1
/*++
2
/* NAME
3
/* stream2rec 1
4
/* SUMMARY
5
/* convert stream-lf data to record format
6
/* SYNOPSIS
7
/* stream2rec
8
/* DESCRIPTION
9
/* stream2rec reads lines from standard input and writes
10
/* them to standard output in record form.
11
/* DIAGNOSTICS
12
/* Problems are reported to the standard error stream.
13
/* LICENSE
14
/* .ad
15
/* .fi
16
/* The Secure Mailer license must be distributed with this software.
17
/* AUTHOR(S)
18
/* Wietse Venema
19
/* IBM T.J. Watson Research
20
/* P.O. Box 704
21
/* Yorktown Heights, NY 10598, USA
22
/*--*/
23
24
/* System library. */
25
26
#include <
sys_defs.h
>
27
28
/* Utility library. */
29
30
#include <
vstream.h
>
31
#include <
vstring.h
>
32
33
/* Global library. */
34
35
#include <
record.h
>
36
#include <
rec_streamlf.h
>
37
38
int
main
(
void
)
39
{
40
VSTRING
*buf =
vstring_alloc
(150);
41
int
type;
42
43
while
((type =
rec_streamlf_get
(
VSTREAM_IN
, buf, 150)) > 0)
44
REC_PUT_BUF
(
VSTREAM_OUT
, type, buf);
45
vstream_fflush
(
VSTREAM_OUT
);
46
return
(0);
47
}
rec_streamlf.h
VSTREAM_OUT
#define VSTREAM_OUT
Definition:
vstream.h:67
VSTREAM_IN
#define VSTREAM_IN
Definition:
vstream.h:66
rec_streamlf_get
int rec_streamlf_get(VSTREAM *stream, VSTRING *buf, int maxlen)
Definition:
rec_streamlf.c:76
REC_PUT_BUF
#define REC_PUT_BUF(v, t, b)
Definition:
record.h:43
main
int main(void)
Definition:
stream2rec.c:38
vstring_alloc
VSTRING * vstring_alloc(ssize_t len)
Definition:
vstring.c:353
VSTRING
Definition:
vstring.h:29
vstring.h
sys_defs.h
vstream_fflush
int vstream_fflush(VSTREAM *stream)
Definition:
vstream.c:1257
record.h
vstream.h
2018年11月10日(土) 18時59分39秒作成 - Postfix3.3.1 / 構成:
1.8.9.1