aboutsummaryrefslogtreecommitdiff
path: root/tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'tar.c')
-rw-r--r--tar.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/tar.c b/tar.c
index 498d4a300..1a9f84217 100644
--- a/tar.c
+++ b/tar.c
@@ -73,18 +73,18 @@ typedef struct
73/* 73/*
74 * Static data. 74 * Static data.
75 */ 75 */
76static BOOL listFlag; 76static int listFlag;
77static BOOL extractFlag; 77static int extractFlag;
78static BOOL createFlag; 78static int createFlag;
79static BOOL verboseFlag; 79static int verboseFlag;
80static BOOL tostdoutFlag; 80static int tostdoutFlag;
81 81
82static BOOL inHeader; 82static int inHeader;
83static BOOL badHeader; 83static int badHeader;
84static BOOL errorFlag; 84static int errorFlag;
85static BOOL skipFileFlag; 85static int skipFileFlag;
86static BOOL warnedRoot; 86static int warnedRoot;
87static BOOL eofFlag; 87static int eofFlag;
88static long dataCc; 88static long dataCc;
89static int outFd; 89static int outFd;
90static char outName[TAR_NAME_SIZE]; 90static char outName[TAR_NAME_SIZE];
@@ -114,7 +114,7 @@ static void readHeader(const TarHeader * hp,
114/* 114/*
115 * Local procedures to save files into a tar file. 115 * Local procedures to save files into a tar file.
116 */ 116 */
117static void saveFile(const char * fileName, BOOL seeLinks); 117static void saveFile(const char * fileName, int seeLinks);
118 118
119static void saveRegularFile(const char * fileName, 119static void saveRegularFile(const char * fileName,
120 const struct stat * statbuf); 120 const struct stat * statbuf);
@@ -122,7 +122,7 @@ static void saveRegularFile(const char * fileName,
122static void saveDirectory(const char * fileName, 122static void saveDirectory(const char * fileName,
123 const struct stat * statbuf); 123 const struct stat * statbuf);
124 124
125static BOOL wantFileName(const char * fileName, 125static int wantFileName(const char * fileName,
126 int fileCount, char ** fileTable); 126 int fileCount, char ** fileTable);
127 127
128static void writeHeader(const char * fileName, 128static void writeHeader(const char * fileName,
@@ -130,7 +130,7 @@ static void writeHeader(const char * fileName,
130 130
131static void writeTarFile(int fileCount, char ** fileTable); 131static void writeTarFile(int fileCount, char ** fileTable);
132static void writeTarBlock(const char * buf, int len); 132static void writeTarBlock(const char * buf, int len);
133static BOOL putOctal(char * cp, int len, long value); 133static int putOctal(char * cp, int len, long value);
134 134
135 135
136extern int 136extern int
@@ -383,8 +383,8 @@ readHeader(const TarHeader * hp, int fileCount, char ** fileTable)
383 time_t mtime; 383 time_t mtime;
384 const char * name; 384 const char * name;
385 int cc; 385 int cc;
386 BOOL hardLink; 386 int hardLink;
387 BOOL softLink; 387 int softLink;
388 388
389 /* 389 /*
390 * If the block is completely empty, then this is the end of the 390 * If the block is completely empty, then this is the end of the
@@ -710,7 +710,7 @@ done:
710 * they really are, instead of blindly following them. 710 * they really are, instead of blindly following them.
711 */ 711 */
712static void 712static void
713saveFile(const char * fileName, BOOL seeLinks) 713saveFile(const char * fileName, int seeLinks)
714{ 714{
715 int status; 715 int status;
716 int mode; 716 int mode;
@@ -788,7 +788,7 @@ saveFile(const char * fileName, BOOL seeLinks)
788static void 788static void
789saveRegularFile(const char * fileName, const struct stat * statbuf) 789saveRegularFile(const char * fileName, const struct stat * statbuf)
790{ 790{
791 BOOL sawEof; 791 int sawEof;
792 int fileFd; 792 int fileFd;
793 int cc; 793 int cc;
794 int dataCount; 794 int dataCount;
@@ -897,7 +897,7 @@ saveDirectory(const char * dirName, const struct stat * statbuf)
897{ 897{
898 DIR * dir; 898 DIR * dir;
899 struct dirent * entry; 899 struct dirent * entry;
900 BOOL needSlash; 900 int needSlash;
901 char fullName[PATH_LEN]; 901 char fullName[PATH_LEN];
902 902
903 /* 903 /*
@@ -1160,7 +1160,7 @@ getOctal(const char * cp, int len)
1160 * The number is zero and space padded and possibly null padded. 1160 * The number is zero and space padded and possibly null padded.
1161 * Returns TRUE if successful. 1161 * Returns TRUE if successful.
1162 */ 1162 */
1163static BOOL 1163static int
1164putOctal(char * cp, int len, long value) 1164putOctal(char * cp, int len, long value)
1165{ 1165{
1166 int tempLength; 1166 int tempLength;
@@ -1212,7 +1212,7 @@ putOctal(char * cp, int len, long value)
1212 * of path prefixes. An empty list implies that all files are wanted. 1212 * of path prefixes. An empty list implies that all files are wanted.
1213 * Returns TRUE if the file is selected. 1213 * Returns TRUE if the file is selected.
1214 */ 1214 */
1215static BOOL 1215static int
1216wantFileName(const char * fileName, int fileCount, char ** fileTable) 1216wantFileName(const char * fileName, int fileCount, char ** fileTable)
1217{ 1217{
1218 const char * pathName; 1218 const char * pathName;