From 10ad622dc2a9fb6563fab13719ead8baf15ff9e4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 17 Apr 2017 16:13:32 +0200 Subject: Spelling fixes in comments, documentation, tests and examples By klemens Signed-off-by: Denys Vlasenko --- archival/dpkg.c | 26 +++++++++++++------------- archival/libarchive/decompress_bunzip2.c | 2 +- archival/libarchive/unxz/xz_dec_lzma2.c | 4 ++-- archival/tar.c | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'archival') 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 @@ * known difference between busybox dpkg and the official dpkg that i don't * consider important, its worth keeping a note of differences anyway, just to * make it easier to maintain. - * - the first value for the confflile: field isnt placed on a new line. + * - the first value for the confflile: field isn't placed on a new line. * - when installing a package the status: field is placed at the end of the * section, rather than just after the package: field. * @@ -110,7 +110,7 @@ typedef struct common_node_s { edge_t **edge; } common_node_t; -/* Currently it doesnt store packages that have state-status of not-installed +/* Currently it doesn't store packages that have state-status of not-installed * So it only really has to be the size of the maximum number of packages * likely to be installed at any one time, so there is a bit of leeway here */ #define STATUS_HASH_PRIME 8191 @@ -205,7 +205,7 @@ static int search_name_hashtable(const char *key) return probe_address; } -/* this DOESNT add the key to the hashtable +/* this DOESN'T add the key to the hashtable * TODO make it consistent with search_name_hashtable */ static unsigned search_status_hashtable(const char *key) @@ -467,7 +467,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole version = strchr(field2, '('); if (version == NULL) { edge->operator = VER_ANY; - /* Get the versions hash number, adding it if the number isnt already in there */ + /* Get the versions hash number, adding it if the number isn't already in there */ edge->version = search_name_hashtable("ANY"); } else { /* Skip leading ' ' or '(' */ @@ -496,7 +496,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole /* Truncate version at trailing ' ' or ')' */ version[strcspn(version, " )")] = '\0'; - /* Get the versions hash number, adding it if the number isnt already in there */ + /* Get the versions hash number, adding it if the number isn't already in there */ edge->version = search_name_hashtable(version); } @@ -562,7 +562,7 @@ static int read_package_field(const char *package_buffer, char **field_name, cha offset_name_end = offset; offset_value_start = next_offset; } - /* TODO: Name might still have trailing spaces if ':' isnt + /* TODO: Name might still have trailing spaces if ':' isn't * immediately after name */ break; case '\n': @@ -776,7 +776,7 @@ static void index_status_file(const char *filename) const unsigned package_num = fill_package_struct(control_buffer); if (package_num != -1) { status_node = xmalloc(sizeof(status_node_t)); - /* fill_package_struct doesnt handle the status field */ + /* fill_package_struct doesn't handle the status field */ status_line = strstr(control_buffer, "Status:"); if (status_line != NULL) { status_line += 7; @@ -850,7 +850,7 @@ static void write_status_file(deb_file_t **deb_file) if (status_hashtable[status_num] != NULL) { const char *status_from_hashtable = name_hashtable[status_hashtable[status_num]->status]; if (strcmp(status_from_file, status_from_hashtable) != 0) { - /* New status isnt exactly the same as old status */ + /* New status isn't exactly the same as old status */ const int state_status = get_status(status_num, 3); if ((strcmp("installed", name_hashtable[state_status]) == 0) || (strcmp("unpacked", name_hashtable[state_status]) == 0) @@ -919,7 +919,7 @@ static void write_status_file(deb_file_t **deb_file) } } } - /* If the package from the status file wasnt handle above, do it now*/ + /* If the package from the status file wasn't handle above, do it now*/ if (!write_flag) { fprintf(new_status_file, "%s\n\n", control_buffer); } @@ -946,7 +946,7 @@ static void write_status_file(deb_file_t **deb_file) if (errno != ENOENT) bb_error_msg_and_die("can't create backup status file"); /* Its ok if renaming the status file fails because status - * file doesnt exist, maybe we are starting from scratch */ + * file doesn't exist, maybe we are starting from scratch */ bb_error_msg("no status file found, creating new one"); } @@ -1061,7 +1061,7 @@ static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count } - /* Check dependendcies */ + /* Check dependentcies */ for (i = 0; i < PACKAGE_HASH_PRIME; i++) { int status_num = 0; int number_of_alternatives = 0; @@ -1244,7 +1244,7 @@ static void run_package_script_or_die(const char *package_name, const char *scri script_path = xasprintf("/var/lib/dpkg/info/%s.%s", package_name, script_type); - /* If the file doesnt exist is isnt fatal */ + /* If the file doesn't exist it isn't fatal */ result = access(script_path, F_OK) ? EXIT_SUCCESS : system(script_path); free(script_path); if (result) @@ -1839,7 +1839,7 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv) ) { status_node = xmalloc(sizeof(status_node_t)); status_node->package = deb_file[deb_count]->package; - /* reinstreq isnt changed to "ok" until the package control info + /* reinstreq isn't changed to "ok" until the package control info * is written to the status file*/ status_node->status = search_name_hashtable("install reinstreq not-installed"); 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) base = hufGroup->base - 1; limit = hufGroup->limit - 1; - /* Calculate permute[]. Concurently, initialize temp[] and limit[]. */ + /* Calculate permute[]. Concurrently, initialize temp[] and limit[]. */ pp = 0; for (i = minLen; i <= maxLen; i++) { 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) } /* - * Decode one bit. In some versions, this function has been splitted in three + * Decode one bit. In some versions, this function has been split in three * functions so that the compiler is supposed to be able to more easily avoid * an extra branch. In this particular version of the LZMA decoder, this * doesn't seem to be a good idea (tested with GCC 3.3.6, 3.4.6, and 4.3.3 - * on x86). Using a non-splitted version results in nicer looking code too. + * on x86). Using a non-split version results in nicer looking code too. * * NOTE: This must return an int. Do not make it return a bool or the speed * 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 /* * Check to see if we are dealing with a hard link. * If so - - * Treat the first occurance of a given dev/inode as a file while - * treating any additional occurances as hard links. This is done + * Treat the first occurrence of a given dev/inode as a file while + * treating any additional occurrences as hard links. This is done * by adding the file information to the HardLinkInfo linked list. */ tbInfo->hlInfo = NULL; -- cgit v1.2.3