aboutsummaryrefslogtreecommitdiff
path: root/include/io/std.h
blob: c5dddfa7f38fc39902e7420aaf03ea85139af0fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* SPDX-License-Identifier: GPL-3.0-or-later */
/*
 * std.h
 *
 * Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
 */
#ifndef IO_STD_H
#define IO_STD_H

#include "io/istream.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Create an input stream that reads from standard input.
 *
 * @memberof sqfs_istream_t
 *
 * @param out Returns a pointer to an input stream on success.
 *
 * @return Zero on success, a negative @ref SQFS_ERROR number on failure
 */
SQFS_INTERNAL int istream_open_stdin(sqfs_istream_t **out);

/**
 * @brief Create an output stream that writes to standard output.
 *
 * @memberof sqfs_ostream_t
 *
 * @param out Returns a pointer to an output stream on success.
 *
 * @return Zero on success, a negative @ref SQFS_ERROR number on failure
 */
SQFS_INTERNAL int ostream_open_stdout(sqfs_ostream_t **out);

#ifdef __cplusplus
}
#endif

#endif /* IO_STD_H */