diff options
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 44 |
1 files changed, 22 insertions, 22 deletions
@@ -73,18 +73,18 @@ typedef struct | |||
73 | /* | 73 | /* |
74 | * Static data. | 74 | * Static data. |
75 | */ | 75 | */ |
76 | static BOOL listFlag; | 76 | static int listFlag; |
77 | static BOOL extractFlag; | 77 | static int extractFlag; |
78 | static BOOL createFlag; | 78 | static int createFlag; |
79 | static BOOL verboseFlag; | 79 | static int verboseFlag; |
80 | static BOOL tostdoutFlag; | 80 | static int tostdoutFlag; |
81 | 81 | ||
82 | static BOOL inHeader; | 82 | static int inHeader; |
83 | static BOOL badHeader; | 83 | static int badHeader; |
84 | static BOOL errorFlag; | 84 | static int errorFlag; |
85 | static BOOL skipFileFlag; | 85 | static int skipFileFlag; |
86 | static BOOL warnedRoot; | 86 | static int warnedRoot; |
87 | static BOOL eofFlag; | 87 | static int eofFlag; |
88 | static long dataCc; | 88 | static long dataCc; |
89 | static int outFd; | 89 | static int outFd; |
90 | static char outName[TAR_NAME_SIZE]; | 90 | static 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 | */ |
117 | static void saveFile(const char * fileName, BOOL seeLinks); | 117 | static void saveFile(const char * fileName, int seeLinks); |
118 | 118 | ||
119 | static void saveRegularFile(const char * fileName, | 119 | static 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, | |||
122 | static void saveDirectory(const char * fileName, | 122 | static void saveDirectory(const char * fileName, |
123 | const struct stat * statbuf); | 123 | const struct stat * statbuf); |
124 | 124 | ||
125 | static BOOL wantFileName(const char * fileName, | 125 | static int wantFileName(const char * fileName, |
126 | int fileCount, char ** fileTable); | 126 | int fileCount, char ** fileTable); |
127 | 127 | ||
128 | static void writeHeader(const char * fileName, | 128 | static void writeHeader(const char * fileName, |
@@ -130,7 +130,7 @@ static void writeHeader(const char * fileName, | |||
130 | 130 | ||
131 | static void writeTarFile(int fileCount, char ** fileTable); | 131 | static void writeTarFile(int fileCount, char ** fileTable); |
132 | static void writeTarBlock(const char * buf, int len); | 132 | static void writeTarBlock(const char * buf, int len); |
133 | static BOOL putOctal(char * cp, int len, long value); | 133 | static int putOctal(char * cp, int len, long value); |
134 | 134 | ||
135 | 135 | ||
136 | extern int | 136 | extern 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 | */ |
712 | static void | 712 | static void |
713 | saveFile(const char * fileName, BOOL seeLinks) | 713 | saveFile(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) | |||
788 | static void | 788 | static void |
789 | saveRegularFile(const char * fileName, const struct stat * statbuf) | 789 | saveRegularFile(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 | */ |
1163 | static BOOL | 1163 | static int |
1164 | putOctal(char * cp, int len, long value) | 1164 | putOctal(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 | */ |
1215 | static BOOL | 1215 | static int |
1216 | wantFileName(const char * fileName, int fileCount, char ** fileTable) | 1216 | wantFileName(const char * fileName, int fileCount, char ** fileTable) |
1217 | { | 1217 | { |
1218 | const char * pathName; | 1218 | const char * pathName; |