summaryrefslogtreecommitdiff
path: root/cp_mv.c
diff options
context:
space:
mode:
authorMatt Kraai2000-07-14 23:28:47 +0000
committerMatt Kraai2000-07-14 23:28:47 +0000
commit3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (patch)
tree6a217bf17e7c00e98a47f657015535f21b53cedd /cp_mv.c
parent464c5de00d3dfb5f01e866f703d95bbb2bb9443c (diff)
downloadbusybox-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.zip
busybox-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.gz
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
Diffstat (limited to 'cp_mv.c')
-rw-r--r--cp_mv.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/cp_mv.c b/cp_mv.c
index a0d677c..72ba537 100644
--- a/cp_mv.c
+++ b/cp_mv.c
@@ -46,25 +46,33 @@
#define is_cp 0
#define is_mv 1
static int dz_i; /* index into cp_mv_usage */
-static const char *cp_mv_usage[] = /* .rodata */
-{
+
+const char cp_usage[] =
"cp [OPTION]... SOURCE DEST\n"
- " or: cp [OPTION]... SOURCE... DIRECTORY\n"
+ " or: cp [OPTION]... SOURCE... DIRECTORY\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nCopies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
- "\n"
- "\t-a\tSame as -dpR\n"
- "\t-d\tPreserves links\n"
- "\t-p\tPreserves file attributes if possible\n"
- "\t-f\tforce (implied; ignored) - always set\n"
- "\t-R\tCopies directories recursively\n"
+ "\nCopies SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n"
+ "\n"
+ "\t-a\tSame as -dpR\n"
+ "\t-d\tPreserves links\n"
+ "\t-p\tPreserves file attributes if possible\n"
+ "\t-f\tforce (implied; ignored) - always set\n"
+ "\t-R\tCopies directories recursively\n"
#endif
- ,
+ ;
+
+const char mv_usage[] =
"mv SOURCE DEST\n"
- " or: mv SOURCE... DIRECTORY\n"
+ " or: mv SOURCE... DIRECTORY\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nRename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
+ "\nRename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"
#endif
+ ;
+
+static const char *cp_mv_usage[] = /* .rodata */
+{
+ cp_usage,
+ mv_usage
};
static int recursiveFlag;