2019-01-29 05:26:22 +08:00
|
|
|
#ifndef FISH_REDIRECTION_H
|
|
|
|
#define FISH_REDIRECTION_H
|
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
#if INCLUDE_RUST_HEADERS
|
2019-10-14 06:50:48 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
#include "redirection.rs.h"
|
2019-01-29 05:26:22 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
#else
|
2019-12-13 08:44:24 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
// Hacks to allow us to compile without Rust headers.
|
2019-12-13 08:44:24 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
enum class RedirectionMode {
|
|
|
|
overwrite,
|
|
|
|
append,
|
|
|
|
input,
|
|
|
|
fd,
|
|
|
|
noclob,
|
2019-12-13 08:44:24 +08:00
|
|
|
};
|
2023-02-04 18:21:42 +08:00
|
|
|
struct Dup2Action;
|
|
|
|
class Dup2List;
|
|
|
|
struct RedirectionSpec;
|
2023-04-09 19:38:18 +08:00
|
|
|
struct RedirectionSpecListFfi;
|
2019-01-29 05:26:22 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
#endif
|
2019-01-29 05:26:22 +08:00
|
|
|
|
2023-02-04 18:21:42 +08:00
|
|
|
using redirection_mode_t = RedirectionMode;
|
|
|
|
using redirection_spec_t = RedirectionSpec;
|
2023-04-09 19:38:18 +08:00
|
|
|
using redirection_spec_list_t = RedirectionSpecListFfi;
|
2023-02-04 18:21:42 +08:00
|
|
|
using dup2_action_t = Dup2Action;
|
|
|
|
using dup2_list_t = Dup2List;
|
2019-01-29 05:26:22 +08:00
|
|
|
|
|
|
|
#endif
|