summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-13 08:32:10 +0000
committerJim Meyering <jim@meyering.net>2001-08-13 08:32:10 +0000
commit3b21e822ac3617b930414f18017ba74fd1dda238 (patch)
treec4e65349ee7092b84dcb0fd32ff6015d31f3626d /src
parent66c2f3a08a7b7ef336db50b04b17c4f3715cd753 (diff)
downloadcoreutils-3b21e822ac3617b930414f18017ba74fd1dda238.tar.xz
(enum Interactive): New type.
(struct cp_options) [interactive]: Change type to Interactive. (struct cp_options) [stdin_tty]: New member.
Diffstat (limited to 'src')
-rw-r--r--src/copy.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/copy.h b/src/copy.h
index 9cc4e4cd3..ad82f372e 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -22,6 +22,14 @@ enum Sparse_type
SPARSE_ALWAYS
};
+/* This type is used to help mv (via copy.c) distinguish these cases. */
+enum Interactive
+{
+ I_OFF = 1,
+ I_ON,
+ I_UNSPECIFIED
+};
+
enum Dereference_symlink
{
DEREF_UNDEFINED = 1,
@@ -69,9 +77,10 @@ struct cp_options
Create destination directories as usual. */
int hard_link;
- /* If nonzero, query before overwriting existing destinations
- with regular files. */
- int interactive;
+ /* This value is used to determine whether to prompt before removing
+ each existing destination file. It works differently depending on
+ whether move_mode is set. See code/comments in copy.c. */
+ enum Interactive interactive;
/* If nonzero, rather than copying, first attempt to use rename.
If that fails, then resort to copying. */
@@ -128,6 +137,9 @@ struct cp_options
/* A pointer to either lstat or stat, depending on
whether the copy should dereference symlinks. */
int (*xstat) ();
+
+ /* If nonzero, stdin is a tty. */
+ int stdin_tty;
};
int stat ();