summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorEric Andersen1999-11-09 01:47:36 +0000
committerEric Andersen1999-11-09 01:47:36 +0000
commit50d6360771be509737bb55b2cc5bc5e25f2a4fea (patch)
tree81d4cfe9ec9b5281924f678c28f61542616a3db7 /archival
parentfbb39c83b69d6c4de943c0b7374000339635d13d (diff)
downloadbusybox-50d6360771be509737bb55b2cc5bc5e25f2a4fea.zip
busybox-50d6360771be509737bb55b2cc5bc5e25f2a4fea.tar.gz
Stuff
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/archival/tar.c b/archival/tar.c
index cd255f8..9ad41be 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -35,6 +35,16 @@
#include <signal.h>
#include <time.h>
+/* Note that tar.c expects TRUE and FALSE to be defined
+ * exactly the opposite of how they are used everywhere else.
+ * Some time this should be integrated a bit better, but this
+ * does the job for now.
+ */
+#undef FALSE
+#undef TRUE
+#define FALSE ((int) 0)
+#define TRUE ((int) 1)
+
static const char tar_usage[] =
"tar -[cxtvOf] [tarFileName] [FILE] ...\n"
@@ -169,10 +179,9 @@ extern int tar_main (int argc, char **argv)
/*
* Parse the options.
*/
- options = *argv++;
- argc--;
-
if (**argv == '-') {
+ options = (*argv++) + 1;
+ argc--;
for (; *options; options++) {
switch (*options) {
case 'f':