"Fossies" - the Fresh Open Source Software Archive
Member "msmtp-1.8.5/src/stream.h" (13 Dec 2018, 1801 Bytes) of package /linux/privat/msmtp-1.8.5.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard
) with prefixed line numbers and code folding
Alternatively you can here view
the uninterpreted source code file.
For more information about "stream.h" see the Fossies "Dox" file reference
documentation and the last Fossies "Diffs"
side-by-side code changes report: 1.8.1_vs_1.8.2
2 * stream.h
4 * This file is part of msmtp, an SMTP client, and of mpop, a POP3 client.
6 * Copyright (C) 2005, 2007
7 * Martin Lambers <firstname.lastname@example.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef STREAM_H
24 #define STREAM_H
26 #include <stdio.h>
30 * If a function with an 'errstr' argument returns a value != STREAM_EOK,
31 * '*errstr' either points to an allocates string containing an error
32 * description or is NULL.
33 * If such a function returns STREAM_EOK, 'errstr' will not be changed.
35 #define STREAM_EOK 0 /* no error */
36 #define STREAM_EIO 1 /* Input/output error */
39 * stream_gets()
41 * Reads in at most one less than 'size' characters from 'f' and stores them
42 * into the buffer pointed to by 'str'. Reading stops after an EOF or a newline.
43 * If a newline is read, it is stored into the buffer. A '\0' is stored after
44 * the last character in the buffer. The length of the resulting string (the
45 * number of characters excluding the terminating '\0') will be stored in 'len'.
46 * Used error codes: STREAM_EIO
48 int stream_gets(FILE *f, char *str, size_t size, size_t *len, char **errstr);