diff options
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -35,6 +35,16 @@ | |||
35 | #include <signal.h> | 35 | #include <signal.h> |
36 | #include <time.h> | 36 | #include <time.h> |
37 | 37 | ||
38 | /* Note that tar.c expects TRUE and FALSE to be defined | ||
39 | * exactly the opposite of how they are used everywhere else. | ||
40 | * Some time this should be integrated a bit better, but this | ||
41 | * does the job for now. | ||
42 | */ | ||
43 | #undef FALSE | ||
44 | #undef TRUE | ||
45 | #define FALSE ((int) 0) | ||
46 | #define TRUE ((int) 1) | ||
47 | |||
38 | 48 | ||
39 | static const char tar_usage[] = | 49 | static const char tar_usage[] = |
40 | "tar -[cxtvOf] [tarFileName] [FILE] ...\n" | 50 | "tar -[cxtvOf] [tarFileName] [FILE] ...\n" |
@@ -169,10 +179,9 @@ extern int tar_main (int argc, char **argv) | |||
169 | /* | 179 | /* |
170 | * Parse the options. | 180 | * Parse the options. |
171 | */ | 181 | */ |
172 | options = *argv++; | ||
173 | argc--; | ||
174 | |||
175 | if (**argv == '-') { | 182 | if (**argv == '-') { |
183 | options = (*argv++) + 1; | ||
184 | argc--; | ||
176 | for (; *options; options++) { | 185 | for (; *options; options++) { |
177 | switch (*options) { | 186 | switch (*options) { |
178 | case 'f': | 187 | case 'f': |