aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-04-14 17:51:38 +0000
committerEric Andersen <andersen@codepoet.org>2004-04-14 17:51:38 +0000
commitaff114c33d2b8879233fa513e6d760d0ef99b632 (patch)
tree101230a8bd16a03319acc4b9b5fb33c33fb58672 /archival
parent4c8b0dd97385b820e28bb8cb2d08ef3bd194a16a (diff)
downloadbusybox-w32-aff114c33d2b8879233fa513e6d760d0ef99b632.tar.gz
busybox-w32-aff114c33d2b8879233fa513e6d760d0ef99b632.tar.bz2
busybox-w32-aff114c33d2b8879233fa513e6d760d0ef99b632.zip
Larry Doolittle writes:
This is a bulk spelling fix patch against busybox-1.00-pre10. If anyone gets a corrupted copy (and cares), let me know and I will make alternate arrangements. Erik - please apply. Authors - please check that I didn't corrupt any meaning. Package importers - see if any of these changes should be passed to the upstream authors. I glossed over lots of sloppy capitalizations, missing apostrophes, mixed American/British spellings, and German-style compound words. What is "pretect redefined for test" in cmdedit.c? Good luck on the 1.00 release! - Larry
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c36
-rw-r--r--archival/gzip.c2
-rw-r--r--archival/libunarchive/data_extract_all.c2
-rw-r--r--archival/libunarchive/decompress_bunzip2.c36
-rw-r--r--archival/libunarchive/decompress_uncompress.c2
-rw-r--r--archival/libunarchive/decompress_unzip.c2
-rw-r--r--archival/libunarchive/get_header_tar.c2
-rw-r--r--archival/tar.c6
8 files changed, 44 insertions, 44 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index e192b4a62..c096518a2 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Mini dpkg implementation for busybox. 2 * Mini dpkg implementation for busybox.
3 * This is not meant as a replacemnt for dpkg 3 * This is not meant as a replacement for dpkg
4 * 4 *
5 * Written By Glenn McGrath with the help of others 5 * Written By Glenn McGrath with the help of others
6 * Copyright (C) 2001 by Glenn McGrath 6 * Copyright (C) 2001 by Glenn McGrath
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25/* 25/*
26 * Known difference between busybox dpkg and the official dpkg that i dont 26 * Known difference between busybox dpkg and the official dpkg that i don't
27 * consider important, its worth keeping a note of differences anyway, just to 27 * consider important, its worth keeping a note of differences anyway, just to
28 * make it easier to maintain. 28 * make it easier to maintain.
29 * - The first value for the Confflile: field isnt placed on a new line. 29 * - The first value for the Confflile: field isnt placed on a new line.
@@ -86,7 +86,7 @@ common_node_t *package_hashtable[PACKAGE_HASH_PRIME + 1];
86 86
87/* Currently it doesnt store packages that have state-status of not-installed 87/* Currently it doesnt store packages that have state-status of not-installed
88 * So it only really has to be the size of the maximum number of packages 88 * So it only really has to be the size of the maximum number of packages
89 * likely to be installed at any one time, so there is a bit of leaway here */ 89 * likely to be installed at any one time, so there is a bit of leeway here */
90#define STATUS_HASH_PRIME 8191 90#define STATUS_HASH_PRIME 8191
91typedef struct status_node_s { 91typedef struct status_node_s {
92 unsigned int package:14; /* has to fit PACKAGE_HASH_PRIME */ 92 unsigned int package:14; /* has to fit PACKAGE_HASH_PRIME */
@@ -94,7 +94,7 @@ typedef struct status_node_s {
94} status_node_t; 94} status_node_t;
95status_node_t *status_hashtable[STATUS_HASH_PRIME + 1]; 95status_node_t *status_hashtable[STATUS_HASH_PRIME + 1];
96 96
97/* Even numbers are for 'extras', like ored dependecies or null */ 97/* Even numbers are for 'extras', like ored dependencies or null */
98enum edge_type_e { 98enum edge_type_e {
99 EDGE_NULL = 0, 99 EDGE_NULL = 0,
100 EDGE_PRE_DEPENDS = 1, 100 EDGE_PRE_DEPENDS = 1,
@@ -148,7 +148,7 @@ void make_hash(const char *key, unsigned int *start, unsigned int *decrement, co
148 for(i = 1; i < len; i++) { 148 for(i = 1; i < len; i++) {
149 /* shifts the ascii based value and adds it to previous value 149 /* shifts the ascii based value and adds it to previous value
150 * shift amount is mod 24 because long int is 32 bit and data 150 * shift amount is mod 24 because long int is 32 bit and data
151 * to be shifted is 8, dont want to shift data to where it has 151 * to be shifted is 8, don't want to shift data to where it has
152 * no effect*/ 152 * no effect*/
153 hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24)); 153 hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24));
154 } 154 }
@@ -392,7 +392,7 @@ int search_package_hashtable(const unsigned int name, const unsigned int version
392/* 392/*
393 * This function searches through the entire package_hashtable looking 393 * This function searches through the entire package_hashtable looking
394 * for a package which provides "needle". It returns the index into 394 * for a package which provides "needle". It returns the index into
395 * the package_hashtable for the provining package. 395 * the package_hashtable for the providing package.
396 * 396 *
397 * needle is the index into name_hashtable of the package we are 397 * needle is the index into name_hashtable of the package we are
398 * looking for. 398 * looking for.
@@ -489,7 +489,7 @@ void add_split_dependencies(common_node_t *parent_node, const char *whole_line,
489 /* Skip leading ' ' or '(' */ 489 /* Skip leading ' ' or '(' */
490 version += strspn(field2, " "); 490 version += strspn(field2, " ");
491 version += strspn(version, "("); 491 version += strspn(version, "(");
492 /* Calculate length of any operator charactors */ 492 /* Calculate length of any operator characters */
493 offset_ch = strspn(version, "<=>"); 493 offset_ch = strspn(version, "<=>");
494 /* Determine operator */ 494 /* Determine operator */
495 if (offset_ch > 0) { 495 if (offset_ch > 0) {
@@ -636,7 +636,7 @@ unsigned int get_status(const unsigned int status_node, const int num)
636 for (i = 1; i < num; i++) { 636 for (i = 1; i < num; i++) {
637 /* skip past a word */ 637 /* skip past a word */
638 status_string += strcspn(status_string, " "); 638 status_string += strcspn(status_string, " ");
639 /* skip past the seperating spaces */ 639 /* skip past the separating spaces */
640 status_string += strspn(status_string, " "); 640 status_string += strspn(status_string, " ");
641 } 641 }
642 len = strcspn(status_string, " \n\0"); 642 len = strcspn(status_string, " \n\0");
@@ -955,13 +955,13 @@ void write_status_file(deb_file_t **deb_file)
955 fclose(new_status_file); 955 fclose(new_status_file);
956 956
957 957
958 /* Create a seperate backfile to dpkg */ 958 /* Create a separate backfile to dpkg */
959 if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) { 959 if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) {
960 struct stat stat_buf; 960 struct stat stat_buf;
961 if (stat("/var/lib/dpkg/status", &stat_buf) == 0) { 961 if (stat("/var/lib/dpkg/status", &stat_buf) == 0) {
962 bb_error_msg_and_die("Couldnt create backup status file"); 962 bb_error_msg_and_die("Couldnt create backup status file");
963 } 963 }
964 /* Its ok if renaming the status file fails becasue status 964 /* Its ok if renaming the status file fails because status
965 * file doesnt exist, maybe we are starting from scratch */ 965 * file doesnt exist, maybe we are starting from scratch */
966 bb_error_msg("No status file found, creating new one"); 966 bb_error_msg("No status file found, creating new one");
967 } 967 }
@@ -971,10 +971,10 @@ void write_status_file(deb_file_t **deb_file)
971 } 971 }
972} 972}
973 973
974/* This function returns TRUE if the given package can statisfy a 974/* This function returns TRUE if the given package can satisfy a
975 * dependency of type depend_type. 975 * dependency of type depend_type.
976 * 976 *
977 * A pre-depends is statisfied only if a package is already installed, 977 * A pre-depends is satisfied only if a package is already installed,
978 * which a regular depends can be satisfied by a package which we want 978 * which a regular depends can be satisfied by a package which we want
979 * to install. 979 * to install.
980 */ 980 */
@@ -1085,7 +1085,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1085 for (i = 0; i < PACKAGE_HASH_PRIME; i++) { 1085 for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
1086 int status_num = 0; 1086 int status_num = 0;
1087 int number_of_alternatives = 0; 1087 int number_of_alternatives = 0;
1088 const edge_t * root_of_alternatives; 1088 const edge_t * root_of_alternatives = NULL;
1089 const common_node_t *package_node = package_hashtable[i]; 1089 const common_node_t *package_node = package_hashtable[i];
1090 1090
1091 /* If the package node does not exist then this 1091 /* If the package node does not exist then this
@@ -1118,7 +1118,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1118 continue; 1118 continue;
1119#endif 1119#endif
1120 1120
1121 /* This code is tested only for EDGE_DEPENDS, sine I 1121 /* This code is tested only for EDGE_DEPENDS, since I
1122 * have no suitable pre-depends available. There is no 1122 * have no suitable pre-depends available. There is no
1123 * reason that it shouldn't work though :-) 1123 * reason that it shouldn't work though :-)
1124 */ 1124 */
@@ -1211,7 +1211,7 @@ char **create_list(const char *filename)
1211 char *line = NULL; 1211 char *line = NULL;
1212 int count = 0; 1212 int count = 0;
1213 1213
1214 /* dont use [xw]fopen here, handle error ourself */ 1214 /* don't use [xw]fopen here, handle error ourself */
1215 list_stream = fopen(filename, "r"); 1215 list_stream = fopen(filename, "r");
1216 if (list_stream == NULL) { 1216 if (list_stream == NULL) {
1217 return(NULL); 1217 return(NULL);
@@ -1385,7 +1385,7 @@ void remove_package(const unsigned int package_num, int noisy)
1385 bb_error_msg_and_die("script failed, prerm failure"); 1385 bb_error_msg_and_die("script failed, prerm failure");
1386 } 1386 }
1387 1387
1388 /* Create a list of files to remove, and a seperate list of those to keep */ 1388 /* Create a list of files to remove, and a separate list of those to keep */
1389 sprintf(list_name, "/var/lib/dpkg/info/%s.list", package_name); 1389 sprintf(list_name, "/var/lib/dpkg/info/%s.list", package_name);
1390 remove_files = create_list(list_name); 1390 remove_files = create_list(list_name);
1391 1391
@@ -1480,7 +1480,7 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
1480 tar_handle = init_handle(); 1480 tar_handle = init_handle();
1481 tar_handle->src_fd = ar_handle->src_fd; 1481 tar_handle->src_fd = ar_handle->src_fd;
1482 1482
1483 /* We dont care about data.tar.* or debian-binary, just control.tar.* */ 1483 /* We don't care about data.tar.* or debian-binary, just control.tar.* */
1484#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1484#ifdef CONFIG_FEATURE_DEB_TAR_GZ
1485 ar_handle->accept = llist_add_to(NULL, "control.tar.gz"); 1485 ar_handle->accept = llist_add_to(NULL, "control.tar.gz");
1486#endif 1486#endif
@@ -1502,7 +1502,7 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
1502 tar_handle = init_handle(); 1502 tar_handle = init_handle();
1503 tar_handle->src_fd = ar_handle->src_fd; 1503 tar_handle->src_fd = ar_handle->src_fd;
1504 1504
1505 /* We dont care about control.tar.* or debian-binary, just data.tar.* */ 1505 /* We don't care about control.tar.* or debian-binary, just data.tar.* */
1506#ifdef CONFIG_FEATURE_DEB_TAR_GZ 1506#ifdef CONFIG_FEATURE_DEB_TAR_GZ
1507 ar_handle->accept = llist_add_to(NULL, "data.tar.gz"); 1507 ar_handle->accept = llist_add_to(NULL, "data.tar.gz");
1508#endif 1508#endif
diff --git a/archival/gzip.c b/archival/gzip.c
index 1708ac1a1..d494aa30e 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -632,7 +632,7 @@ static void copy_block(char *buf, unsigned len, int header)
632 * However the F&G algorithm may be faster for some highly redundant 632 * However the F&G algorithm may be faster for some highly redundant
633 * files if the parameter max_chain_length (described below) is too large. 633 * files if the parameter max_chain_length (described below) is too large.
634 * 634 *
635 * ACKNOWLEDGEMENTS 635 * ACKNOWLEDGMENTS
636 * 636 *
637 * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and 637 * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
638 * I found it in 'freeze' written by Leonid Broukhis. 638 * I found it in 'freeze' written by Leonid Broukhis.
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index a9a3a93d8..52edaa182 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -66,7 +66,7 @@ extern void data_extract_all(archive_handle_t *archive_handle)
66 } 66 }
67 } 67 }
68 68
69 /* Handle hard links seperately 69 /* Handle hard links separately
70 * We identified hard links as regular files of size 0 with a symlink */ 70 * We identified hard links as regular files of size 0 with a symlink */
71 if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) { 71 if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) {
72 /* hard link */ 72 /* hard link */
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index af165336e..4b8ceb804 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -13,7 +13,7 @@
13/* 13/*
14 Size and speed optimizations by Manuel Novoa III (mjn3@codepoet.org). 14 Size and speed optimizations by Manuel Novoa III (mjn3@codepoet.org).
15 15
16 More efficient reading of huffman codes, a streamlined read_bunzip() 16 More efficient reading of Huffman codes, a streamlined read_bunzip()
17 function, and various other tweaks. In (limited) tests, approximately 17 function, and various other tweaks. In (limited) tests, approximately
18 20% faster than bzcat on x86 and about 10% faster on arm. 18 20% faster than bzcat on x86 and about 10% faster on arm.
19 19
@@ -49,10 +49,10 @@
49 49
50#include "libbb.h" 50#include "libbb.h"
51 51
52/* Constants for huffman coding */ 52/* Constants for Huffman coding */
53#define MAX_GROUPS 6 53#define MAX_GROUPS 6
54#define GROUP_SIZE 50 /* 64 would have been more efficient */ 54#define GROUP_SIZE 50 /* 64 would have been more efficient */
55#define MAX_HUFCODE_BITS 20 /* Longest huffman code allowed */ 55#define MAX_HUFCODE_BITS 20 /* Longest Huffman code allowed */
56#define MAX_SYMBOLS 258 /* 256 literals + RUNA + RUNB */ 56#define MAX_SYMBOLS 258 /* 256 literals + RUNA + RUNB */
57#define SYMBOL_RUNA 0 57#define SYMBOL_RUNA 0
58#define SYMBOL_RUNB 1 58#define SYMBOL_RUNB 1
@@ -70,7 +70,7 @@
70/* Other housekeeping constants */ 70/* Other housekeeping constants */
71#define IOBUF_SIZE 4096 71#define IOBUF_SIZE 4096
72 72
73/* This is what we know about each huffman coding group */ 73/* This is what we know about each Huffman coding group */
74struct group_data { 74struct group_data {
75 /* We have an extra slot at the end of limit[] for a sentinal value. */ 75 /* We have an extra slot at the end of limit[] for a sentinal value. */
76 int limit[MAX_HUFCODE_BITS+1],base[MAX_HUFCODE_BITS],permute[MAX_SYMBOLS]; 76 int limit[MAX_HUFCODE_BITS+1],base[MAX_HUFCODE_BITS],permute[MAX_SYMBOLS];
@@ -92,7 +92,7 @@ typedef struct {
92 unsigned int *dbuf, dbufSize; 92 unsigned int *dbuf, dbufSize;
93 /* These things are a bit too big to go on the stack */ 93 /* These things are a bit too big to go on the stack */
94 unsigned char selectors[32768]; /* nSelectors=15 bits */ 94 unsigned char selectors[32768]; /* nSelectors=15 bits */
95 struct group_data groups[MAX_GROUPS]; /* huffman coding tables */ 95 struct group_data groups[MAX_GROUPS]; /* Huffman coding tables */
96 /* For I/O error handling */ 96 /* For I/O error handling */
97 jmp_buf jmpbuf; 97 jmp_buf jmpbuf;
98} bunzip_data; 98} bunzip_data;
@@ -172,10 +172,10 @@ static int get_next_block(bunzip_data *bd)
172 if(k&(1<<(15-j))) symToByte[symTotal++]=(16*i)+j; 172 if(k&(1<<(15-j))) symToByte[symTotal++]=(16*i)+j;
173 } 173 }
174 } 174 }
175 /* How many different huffman coding groups does this block use? */ 175 /* How many different Huffman coding groups does this block use? */
176 groupCount=get_bits(bd,3); 176 groupCount=get_bits(bd,3);
177 if (groupCount<2 || groupCount>MAX_GROUPS) return RETVAL_DATA_ERROR; 177 if (groupCount<2 || groupCount>MAX_GROUPS) return RETVAL_DATA_ERROR;
178 /* nSelectors: Every GROUP_SIZE many symbols we select a new huffman coding 178 /* nSelectors: Every GROUP_SIZE many symbols we select a new Huffman coding
179 group. Read in the group selector list, which is stored as MTF encoded 179 group. Read in the group selector list, which is stored as MTF encoded
180 bit runs. (MTF=Move To Front, as each value is used it's moved to the 180 bit runs. (MTF=Move To Front, as each value is used it's moved to the
181 start of the list.) */ 181 start of the list.) */
@@ -189,13 +189,13 @@ static int get_next_block(bunzip_data *bd)
189 for(;j;j--) mtfSymbol[j] = mtfSymbol[j-1]; 189 for(;j;j--) mtfSymbol[j] = mtfSymbol[j-1];
190 mtfSymbol[0]=selectors[i]=uc; 190 mtfSymbol[0]=selectors[i]=uc;
191 } 191 }
192 /* Read the huffman coding tables for each group, which code for symTotal 192 /* Read the Huffman coding tables for each group, which code for symTotal
193 literal symbols, plus two run symbols (RUNA, RUNB) */ 193 literal symbols, plus two run symbols (RUNA, RUNB) */
194 symCount=symTotal+2; 194 symCount=symTotal+2;
195 for (j=0; j<groupCount; j++) { 195 for (j=0; j<groupCount; j++) {
196 unsigned char length[MAX_SYMBOLS],temp[MAX_HUFCODE_BITS+1]; 196 unsigned char length[MAX_SYMBOLS],temp[MAX_HUFCODE_BITS+1];
197 int minLen, maxLen, pp; 197 int minLen, maxLen, pp;
198 /* Read huffman code lengths for each symbol. They're stored in 198 /* Read Huffman code lengths for each symbol. They're stored in
199 a way similar to mtf; record a starting value for the first symbol, 199 a way similar to mtf; record a starting value for the first symbol,
200 and an offset from the previous value for everys symbol after that. 200 and an offset from the previous value for everys symbol after that.
201 (Subtracting 1 before the loop and then adding it back at the end is 201 (Subtracting 1 before the loop and then adding it back at the end is
@@ -228,12 +228,12 @@ static int get_next_block(bunzip_data *bd)
228 } 228 }
229 /* Calculate permute[], base[], and limit[] tables from length[]. 229 /* Calculate permute[], base[], and limit[] tables from length[].
230 * 230 *
231 * permute[] is the lookup table for converting huffman coded symbols 231 * permute[] is the lookup table for converting Huffman coded symbols
232 * into decoded symbols. base[] is the amount to subtract from the 232 * into decoded symbols. base[] is the amount to subtract from the
233 * value of a huffman symbol of a given length when using permute[]. 233 * value of a Huffman symbol of a given length when using permute[].
234 * 234 *
235 * limit[] indicates the largest numerical value a symbol with a given 235 * limit[] indicates the largest numerical value a symbol with a given
236 * number of bits can have. This is how the huffman codes can vary in 236 * number of bits can have. This is how the Huffman codes can vary in
237 * length: each code with a value>limit[length] needs another bit. 237 * length: each code with a value>limit[length] needs another bit.
238 */ 238 */
239 hufGroup=bd->groups+j; 239 hufGroup=bd->groups+j;
@@ -275,7 +275,7 @@ static int get_next_block(bunzip_data *bd)
275 base[minLen]=0; 275 base[minLen]=0;
276 } 276 }
277 /* We've finished reading and digesting the block header. Now read this 277 /* We've finished reading and digesting the block header. Now read this
278 block's huffman coded symbols from the file and undo the huffman coding 278 block's Huffman coded symbols from the file and undo the Huffman coding
279 and run length encoding, saving the result into dbuf[dbufCount++]=uc */ 279 and run length encoding, saving the result into dbuf[dbufCount++]=uc */
280 280
281 /* Initialize symbol occurrence counters and symbol Move To Front table */ 281 /* Initialize symbol occurrence counters and symbol Move To Front table */
@@ -286,7 +286,7 @@ static int get_next_block(bunzip_data *bd)
286 /* Loop through compressed symbols. */ 286 /* Loop through compressed symbols. */
287 runPos=dbufCount=symCount=selector=0; 287 runPos=dbufCount=symCount=selector=0;
288 for(;;) { 288 for(;;) {
289 /* Determine which huffman coding group to use. */ 289 /* Determine which Huffman coding group to use. */
290 if(!(symCount--)) { 290 if(!(symCount--)) {
291 symCount=GROUP_SIZE-1; 291 symCount=GROUP_SIZE-1;
292 if(selector>=nSelectors) return RETVAL_DATA_ERROR; 292 if(selector>=nSelectors) return RETVAL_DATA_ERROR;
@@ -294,7 +294,7 @@ static int get_next_block(bunzip_data *bd)
294 base=hufGroup->base-1; 294 base=hufGroup->base-1;
295 limit=hufGroup->limit-1; 295 limit=hufGroup->limit-1;
296 } 296 }
297 /* Read next huffman-coded symbol. */ 297 /* Read next Huffman-coded symbol. */
298 /* Note: It is far cheaper to read maxLen bits and back up than it is 298 /* Note: It is far cheaper to read maxLen bits and back up than it is
299 to read minLen bits and then an additional bit at a time, testing 299 to read minLen bits and then an additional bit at a time, testing
300 as we go. Because there is a trailing last block (with file CRC), 300 as we go. Because there is a trailing last block (with file CRC),
@@ -383,7 +383,7 @@ got_huff_bits:
383 byteCount[uc]++; 383 byteCount[uc]++;
384 dbuf[dbufCount++] = (unsigned int)uc; 384 dbuf[dbufCount++] = (unsigned int)uc;
385 } 385 }
386 /* At this point, we've read all the huffman-coded symbols (and repeated 386 /* At this point, we've read all the Huffman-coded symbols (and repeated
387 runs) for this block from the input stream, and decoded them into the 387 runs) for this block from the input stream, and decoded them into the
388 intermediate buffer. There are dbufCount many decoded bytes in dbuf[]. 388 intermediate buffer. There are dbufCount many decoded bytes in dbuf[].
389 Now undo the Burrows-Wheeler transform on dbuf. 389 Now undo the Burrows-Wheeler transform on dbuf.
@@ -439,7 +439,7 @@ static int read_bunzip(bunzip_data *bd, char *outbuf, int len)
439 439
440 /* We will always have pending decoded data to write into the output 440 /* We will always have pending decoded data to write into the output
441 buffer unless this is the very first call (in which case we haven't 441 buffer unless this is the very first call (in which case we haven't
442 huffman-decoded a block into the intermediate buffer yet). */ 442 Huffman-decoded a block into the intermediate buffer yet). */
443 443
444 if (bd->writeCopies) { 444 if (bd->writeCopies) {
445 /* Inside the loop, writeCopies means extra copies (beyond 1) */ 445 /* Inside the loop, writeCopies means extra copies (beyond 1) */
@@ -495,7 +495,7 @@ decode_next_byte:
495 } 495 }
496 } 496 }
497 497
498 /* Refill the intermediate buffer by huffman-decoding next block of input */ 498 /* Refill the intermediate buffer by Huffman-decoding next block of input */
499 /* (previous is just a convenient unused temp variable here) */ 499 /* (previous is just a convenient unused temp variable here) */
500 previous=get_next_block(bd); 500 previous=get_next_block(bd);
501 if(previous) { 501 if(previous) {
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index ddf293fd6..e39872cbe 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -30,7 +30,7 @@
30#include <string.h> 30#include <string.h>
31#include <unistd.h> 31#include <unistd.h>
32 32
33/* Defailt input buffer size */ 33/* Default input buffer size */
34#define IBUFSIZ 2048 34#define IBUFSIZ 2048
35 35
36/* Default output buffer size */ 36/* Default output buffer size */
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index a436db191..35fcfeec8 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -892,7 +892,7 @@ static int inflate_get_next_window(void)
892 /* Doesnt get here */ 892 /* Doesnt get here */
893} 893}
894 894
895/* Initialise bytebuffer, be carefull not to overfill the buffer */ 895/* Initialise bytebuffer, be careful not to overfill the buffer */
896extern void inflate_init(unsigned int bufsize) 896extern void inflate_init(unsigned int bufsize)
897{ 897{
898 /* Set the bytebuffer size, default is same as gunzip_wsize */ 898 /* Set the bytebuffer size, default is same as gunzip_wsize */
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index c6ebdae80..33f19c60a 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -14,7 +14,7 @@
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 * 15 *
16 * FIXME: 16 * FIXME:
17 * In privelidged mode if uname and gname map to a uid amd gid then use the 17 * In privileged mode if uname and gname map to a uid and gid then use the
18 * mapped value instead of the uid/gid values in tar header 18 * mapped value instead of the uid/gid values in tar header
19 * 19 *
20 * References: 20 * References:
diff --git a/archival/tar.c b/archival/tar.c
index 279cbfd46..8d2ccca77 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -2,11 +2,11 @@
2/* 2/*
3 * Mini tar implementation for busybox 3 * Mini tar implementation for busybox
4 * 4 *
5 * Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg 5 * Modified to use common extraction code used by ar, cpio, dpkg-deb, dpkg
6 * Glenn McGrath <bug1@optushome.com.au> 6 * Glenn McGrath <bug1@optushome.com.au>
7 * 7 *
8 * Note, that as of BusyBox-0.43, tar has been completely rewritten from the 8 * Note, that as of BusyBox-0.43, tar has been completely rewritten from the
9 * ground up. It still has remnents of the old code lying about, but it is 9 * ground up. It still has remnants of the old code lying about, but it is
10 * very different now (i.e., cleaner, less global variables, etc.) 10 * very different now (i.e., cleaner, less global variables, etc.)
11 * 11 *
12 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> 12 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
@@ -796,7 +796,7 @@ int tar_main(int argc, char **argv)
796 } 796 }
797 797
798 /* Setup an array of filenames to work with */ 798 /* Setup an array of filenames to work with */
799 /* TODO: This is the same as in ar, seperate function ? */ 799 /* TODO: This is the same as in ar, separate function ? */
800 while (optind < argc) { 800 while (optind < argc) {
801 char *filename_ptr = last_char_is(argv[optind], '/'); 801 char *filename_ptr = last_char_is(argv[optind], '/');
802 if (filename_ptr) { 802 if (filename_ptr) {