*/
-#include "busybox.h"
-#define BB_DECLARE_EXTERN
-#define bb_need_io_error
-#define bb_need_name_longer_than_foo
-#include "messages.c"
#include <stdio.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include "busybox.h"
+#define BB_DECLARE_EXTERN
+#define bb_need_io_error
+#define bb_need_name_longer_than_foo
+#include "messages.c"
#ifdef BB_FEATURE_TAR_GZIP
extern int unzip(int in, int out);
int opt;
if (argc <= 1)
- usage(tar_usage);
+ show_usage();
if (argv[1][0] != '-') {
char *tmp = xmalloc(strlen(argv[1]) + 2);
while (fgets(file, sizeof(file), fileList) != NULL) {
excludeList = xrealloc(excludeList,
sizeof(char *) * (excludeListSize+2));
- if (file[strlen(file)-1] == '\n')
- file[strlen(file)-1] = '\0';
+ chomp(file);
excludeList[excludeListSize] = xstrdup(file);
/* Tack a NULL onto the end of the list */
excludeList[++excludeListSize] = NULL;
break;
#endif
default:
- usage(tar_usage);
+ show_usage();
}
}