diff options
author | 2021-02-21 13:16:54 +0200 | |
---|---|---|
committer | 2021-02-21 13:19:06 +0200 | |
commit | 29712a5098842ea3930ec00ddd1c0b9d264ba9b5 (patch) | |
tree | 3744b445acb971342be18fa6d2c9c4c20a470e1d /src/stream.h | |
parent | 26ab990a747ab675bcff32a40734dcb61468f652 (diff) | |
download | algos-ld1-29712a5098842ea3930ec00ddd1c0b9d264ba9b5.tar.gz algos-ld1-29712a5098842ea3930ec00ddd1c0b9d264ba9b5.tar.bz2 algos-ld1-29712a5098842ea3930ec00ddd1c0b9d264ba9b5.zip |
in-memory array sorting: GET!
lists need a bit more work and after that, in-file should shortly
follow.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/stream.h')
-rw-r--r-- | src/stream.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/stream.h b/src/stream.h new file mode 100644 index 0000000..7a429a4 --- /dev/null +++ b/src/stream.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +/* Copyright (C) 2020 Gediminas Jakutis */ + +#ifndef ALGOS_IO_H_INCLUDED +#define ALGOS_IO_H_INCLUDED + +#include "defs.h" + +int stream_open(struct stream * const in); +int stream_close(struct stream * const in); +int stream_readfile(struct stream * const in); + +int direct_get_array(struct stream * const restrict in, ssize_t idx, struct entry_l * const data); +int direct_get_list(struct stream * const restrict in, ssize_t idx, struct entry_l * const data); + +int direct_put_array(struct stream * const restrict in, ssize_t idx, const struct entry_l * const data); +int direct_put_list(struct stream * const restrict in, ssize_t idx, const struct entry_l * const data); + +int stream_shallow_copy(struct stream const * const restrict src, struct stream * const dest); +#endif /* ALGOS_IO_H_INCLUDED */ |