aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-17 16:13:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-17 16:13:32 +0200
commit10ad622dc2a9fb6563fab13719ead8baf15ff9e4 (patch)
tree82312d6f38a517dcc7c0004f78d76c667f5a674b /archival
parentd85352b4ff51694cb35b429e4cef53302c9e7076 (diff)
downloadbusybox-w32-10ad622dc2a9fb6563fab13719ead8baf15ff9e4.tar.gz
busybox-w32-10ad622dc2a9fb6563fab13719ead8baf15ff9e4.tar.bz2
busybox-w32-10ad622dc2a9fb6563fab13719ead8baf15ff9e4.zip
Spelling fixes in comments, documentation, tests and examples
By klemens <ka7@github.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c26
-rw-r--r--archival/libarchive/decompress_bunzip2.c2
-rw-r--r--archival/libarchive/unxz/xz_dec_lzma2.c4
-rw-r--r--archival/tar.c4
4 files changed, 18 insertions, 18 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index f133299e3..1cd45eda4 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -18,7 +18,7 @@
18 * known difference between busybox dpkg and the official dpkg that i don't 18 * known difference between busybox dpkg and the official dpkg that i don't
19 * consider important, its worth keeping a note of differences anyway, just to 19 * consider important, its worth keeping a note of differences anyway, just to
20 * make it easier to maintain. 20 * make it easier to maintain.
21 * - the first value for the confflile: field isnt placed on a new line. 21 * - the first value for the confflile: field isn't placed on a new line.
22 * - when installing a package the status: field is placed at the end of the 22 * - when installing a package the status: field is placed at the end of the
23 * section, rather than just after the package: field. 23 * section, rather than just after the package: field.
24 * 24 *
@@ -110,7 +110,7 @@ typedef struct common_node_s {
110 edge_t **edge; 110 edge_t **edge;
111} common_node_t; 111} common_node_t;
112 112
113/* Currently it doesnt store packages that have state-status of not-installed 113/* Currently it doesn't store packages that have state-status of not-installed
114 * So it only really has to be the size of the maximum number of packages 114 * So it only really has to be the size of the maximum number of packages
115 * likely to be installed at any one time, so there is a bit of leeway here */ 115 * likely to be installed at any one time, so there is a bit of leeway here */
116#define STATUS_HASH_PRIME 8191 116#define STATUS_HASH_PRIME 8191
@@ -205,7 +205,7 @@ static int search_name_hashtable(const char *key)
205 return probe_address; 205 return probe_address;
206} 206}
207 207
208/* this DOESNT add the key to the hashtable 208/* this DOESN'T add the key to the hashtable
209 * TODO make it consistent with search_name_hashtable 209 * TODO make it consistent with search_name_hashtable
210 */ 210 */
211static unsigned search_status_hashtable(const char *key) 211static unsigned search_status_hashtable(const char *key)
@@ -467,7 +467,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole
467 version = strchr(field2, '('); 467 version = strchr(field2, '(');
468 if (version == NULL) { 468 if (version == NULL) {
469 edge->operator = VER_ANY; 469 edge->operator = VER_ANY;
470 /* Get the versions hash number, adding it if the number isnt already in there */ 470 /* Get the versions hash number, adding it if the number isn't already in there */
471 edge->version = search_name_hashtable("ANY"); 471 edge->version = search_name_hashtable("ANY");
472 } else { 472 } else {
473 /* Skip leading ' ' or '(' */ 473 /* Skip leading ' ' or '(' */
@@ -496,7 +496,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole
496 496
497 /* Truncate version at trailing ' ' or ')' */ 497 /* Truncate version at trailing ' ' or ')' */
498 version[strcspn(version, " )")] = '\0'; 498 version[strcspn(version, " )")] = '\0';
499 /* Get the versions hash number, adding it if the number isnt already in there */ 499 /* Get the versions hash number, adding it if the number isn't already in there */
500 edge->version = search_name_hashtable(version); 500 edge->version = search_name_hashtable(version);
501 } 501 }
502 502
@@ -562,7 +562,7 @@ static int read_package_field(const char *package_buffer, char **field_name, cha
562 offset_name_end = offset; 562 offset_name_end = offset;
563 offset_value_start = next_offset; 563 offset_value_start = next_offset;
564 } 564 }
565 /* TODO: Name might still have trailing spaces if ':' isnt 565 /* TODO: Name might still have trailing spaces if ':' isn't
566 * immediately after name */ 566 * immediately after name */
567 break; 567 break;
568 case '\n': 568 case '\n':
@@ -776,7 +776,7 @@ static void index_status_file(const char *filename)
776 const unsigned package_num = fill_package_struct(control_buffer); 776 const unsigned package_num = fill_package_struct(control_buffer);
777 if (package_num != -1) { 777 if (package_num != -1) {
778 status_node = xmalloc(sizeof(status_node_t)); 778 status_node = xmalloc(sizeof(status_node_t));
779 /* fill_package_struct doesnt handle the status field */ 779 /* fill_package_struct doesn't handle the status field */
780 status_line = strstr(control_buffer, "Status:"); 780 status_line = strstr(control_buffer, "Status:");
781 if (status_line != NULL) { 781 if (status_line != NULL) {
782 status_line += 7; 782 status_line += 7;
@@ -850,7 +850,7 @@ static void write_status_file(deb_file_t **deb_file)
850 if (status_hashtable[status_num] != NULL) { 850 if (status_hashtable[status_num] != NULL) {
851 const char *status_from_hashtable = name_hashtable[status_hashtable[status_num]->status]; 851 const char *status_from_hashtable = name_hashtable[status_hashtable[status_num]->status];
852 if (strcmp(status_from_file, status_from_hashtable) != 0) { 852 if (strcmp(status_from_file, status_from_hashtable) != 0) {
853 /* New status isnt exactly the same as old status */ 853 /* New status isn't exactly the same as old status */
854 const int state_status = get_status(status_num, 3); 854 const int state_status = get_status(status_num, 3);
855 if ((strcmp("installed", name_hashtable[state_status]) == 0) 855 if ((strcmp("installed", name_hashtable[state_status]) == 0)
856 || (strcmp("unpacked", name_hashtable[state_status]) == 0) 856 || (strcmp("unpacked", name_hashtable[state_status]) == 0)
@@ -919,7 +919,7 @@ static void write_status_file(deb_file_t **deb_file)
919 } 919 }
920 } 920 }
921 } 921 }
922 /* If the package from the status file wasnt handle above, do it now*/ 922 /* If the package from the status file wasn't handle above, do it now*/
923 if (!write_flag) { 923 if (!write_flag) {
924 fprintf(new_status_file, "%s\n\n", control_buffer); 924 fprintf(new_status_file, "%s\n\n", control_buffer);
925 } 925 }
@@ -946,7 +946,7 @@ static void write_status_file(deb_file_t **deb_file)
946 if (errno != ENOENT) 946 if (errno != ENOENT)
947 bb_error_msg_and_die("can't create backup status file"); 947 bb_error_msg_and_die("can't create backup status file");
948 /* Its ok if renaming the status file fails because status 948 /* Its ok if renaming the status file fails because status
949 * file doesnt exist, maybe we are starting from scratch */ 949 * file doesn't exist, maybe we are starting from scratch */
950 bb_error_msg("no status file found, creating new one"); 950 bb_error_msg("no status file found, creating new one");
951 } 951 }
952 952
@@ -1061,7 +1061,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count
1061 } 1061 }
1062 1062
1063 1063
1064 /* Check dependendcies */ 1064 /* Check dependentcies */
1065 for (i = 0; i < PACKAGE_HASH_PRIME; i++) { 1065 for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
1066 int status_num = 0; 1066 int status_num = 0;
1067 int number_of_alternatives = 0; 1067 int number_of_alternatives = 0;
@@ -1244,7 +1244,7 @@ static void run_package_script_or_die(const char *package_name, const char *scri
1244 1244
1245 script_path = xasprintf("/var/lib/dpkg/info/%s.%s", package_name, script_type); 1245 script_path = xasprintf("/var/lib/dpkg/info/%s.%s", package_name, script_type);
1246 1246
1247 /* If the file doesnt exist is isnt fatal */ 1247 /* If the file doesn't exist it isn't fatal */
1248 result = access(script_path, F_OK) ? EXIT_SUCCESS : system(script_path); 1248 result = access(script_path, F_OK) ? EXIT_SUCCESS : system(script_path);
1249 free(script_path); 1249 free(script_path);
1250 if (result) 1250 if (result)
@@ -1839,7 +1839,7 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv)
1839 ) { 1839 ) {
1840 status_node = xmalloc(sizeof(status_node_t)); 1840 status_node = xmalloc(sizeof(status_node_t));
1841 status_node->package = deb_file[deb_count]->package; 1841 status_node->package = deb_file[deb_count]->package;
1842 /* reinstreq isnt changed to "ok" until the package control info 1842 /* reinstreq isn't changed to "ok" until the package control info
1843 * is written to the status file*/ 1843 * is written to the status file*/
1844 status_node->status = search_name_hashtable("install reinstreq not-installed"); 1844 status_node->status = search_name_hashtable("install reinstreq not-installed");
1845 status_hashtable[status_num] = status_node; 1845 status_hashtable[status_num] = status_node;
diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c
index 4fb989c29..803702f75 100644
--- a/archival/libarchive/decompress_bunzip2.c
+++ b/archival/libarchive/decompress_bunzip2.c
@@ -308,7 +308,7 @@ static int get_next_block(bunzip_data *bd)
308 base = hufGroup->base - 1; 308 base = hufGroup->base - 1;
309 limit = hufGroup->limit - 1; 309 limit = hufGroup->limit - 1;
310 310
311 /* Calculate permute[]. Concurently, initialize temp[] and limit[]. */ 311 /* Calculate permute[]. Concurrently, initialize temp[] and limit[]. */
312 pp = 0; 312 pp = 0;
313 for (i = minLen; i <= maxLen; i++) { 313 for (i = minLen; i <= maxLen; i++) {
314 int k; 314 int k;
diff --git a/archival/libarchive/unxz/xz_dec_lzma2.c b/archival/libarchive/unxz/xz_dec_lzma2.c
index 351251f7c..bca41e705 100644
--- a/archival/libarchive/unxz/xz_dec_lzma2.c
+++ b/archival/libarchive/unxz/xz_dec_lzma2.c
@@ -486,11 +486,11 @@ static __always_inline void XZ_FUNC rc_normalize(struct rc_dec *rc)
486} 486}
487 487
488/* 488/*
489 * Decode one bit. In some versions, this function has been splitted in three 489 * Decode one bit. In some versions, this function has been split in three
490 * functions so that the compiler is supposed to be able to more easily avoid 490 * functions so that the compiler is supposed to be able to more easily avoid
491 * an extra branch. In this particular version of the LZMA decoder, this 491 * an extra branch. In this particular version of the LZMA decoder, this
492 * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3 492 * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3
493 * on x86). Using a non-splitted version results in nicer looking code too. 493 * on x86). Using a non-split version results in nicer looking code too.
494 * 494 *
495 * NOTE: This must return an int. Do not make it return a bool or the speed 495 * NOTE: This must return an int. Do not make it return a bool or the speed
496 * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care, 496 * of the code generated by GCC 3.x decreases 10-15 %. (GCC 4.3 doesn't care,
diff --git a/archival/tar.c b/archival/tar.c
index b1d58a2df..b70e00a8b 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -529,8 +529,8 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb
529 /* 529 /*
530 * Check to see if we are dealing with a hard link. 530 * Check to see if we are dealing with a hard link.
531 * If so - 531 * If so -
532 * Treat the first occurance of a given dev/inode as a file while 532 * Treat the first occurrence of a given dev/inode as a file while
533 * treating any additional occurances as hard links. This is done 533 * treating any additional occurrences as hard links. This is done
534 * by adding the file information to the HardLinkInfo linked list. 534 * by adding the file information to the HardLinkInfo linked list.
535 */ 535 */
536 tbInfo->hlInfo = NULL; 536 tbInfo->hlInfo = NULL;