OSDN Git Service

Don't export IFS outside testcase function
[yash/yash.git] / redir.h
diff --git a/redir.h b/redir.h
index 46c77b2..07d514e 100644 (file)
--- a/redir.h
+++ b/redir.h
@@ -1,6 +1,6 @@
 /* Yash: yet another shell */
 /* redir.h: manages file descriptors and provides functions for redirections */
-/* (C) 2007-2009 magicant */
+/* (C) 2007-2023 magicant */
 
 /* This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
 #ifndef YASH_REDIR_H
 #define YASH_REDIR_H
 
-#include <stdio.h>
+#include <stddef.h>
 
 
 extern int xclose(int fd);
@@ -36,23 +36,23 @@ extern _Bool is_shellfd(int fd)
     __attribute__((pure));
 extern void clear_shellfds(_Bool leavefds);
 extern int copy_as_shellfd(int fd);
-extern FILE *reopen_with_shellfd(FILE *f, const char *mode);
+extern int move_to_shellfd(int fd);
 extern void open_ttyfd(void);
-extern int get_ttyfd(void) __attribute__((pure));
 
 typedef struct savefd_T savefd_T;
 struct redir_T;
 
-extern _Bool open_redirections(const struct redir_T *r, struct savefd_T **save);
+extern _Bool open_redirections(const struct redir_T *r, savefd_T **save)
+    __attribute__((nonnull(2)));
 extern void undo_redirections(savefd_T *save);
 extern void clear_savefd(savefd_T *save);
 extern void maybe_redirect_stdin_to_devnull(void);
 
-#define PIDX_IN  0   /* index of the reading end of a pipe */
-#define PIDX_OUT 1   /* index of the writing end of a pipe */
+#define PIPE_IN  0   /* index of the reading end of a pipe */
+#define PIPE_OUT 1   /* index of the writing end of a pipe */
 
 
 #endif /* YASH_REDIR_H */
 
 
-/* vim: set ts=8 sts=4 sw=4 noet: */
+/* vim: set ts=8 sts=4 sw=4 et tw=80: */