A few grammar fixes.

Thanks to Christian Weisgerber for pointing out some of these.
This commit is contained in:
Lasse Collin 2009-09-12 14:07:36 +03:00
parent 8905a33daa
commit 4ab7b16b95
7 changed files with 23 additions and 23 deletions

View File

@ -95,8 +95,8 @@
/* Use the standard inttypes.h. */ /* Use the standard inttypes.h. */
# ifdef __cplusplus # ifdef __cplusplus
/* /*
* C99 sections 7.18.2 and 7.18.4 specify that * C99 sections 7.18.2 and 7.18.4 specify
* in C++ implementations define the limit * that C++ implementations define the limit
* and constant macros only if specifically * and constant macros only if specifically
* requested. Note that if you want the * requested. Note that if you want the
* format macros (PRIu64 etc.) too, you need * format macros (PRIu64 etc.) too, you need

View File

@ -10,8 +10,8 @@
* number of bytes required to represent the given value. Encodings that use * number of bytes required to represent the given value. Encodings that use
* non-minimum number of bytes are invalid, thus every integer has exactly * non-minimum number of bytes are invalid, thus every integer has exactly
* one encoded representation. The maximum number of bits in a VLI is 63, * one encoded representation. The maximum number of bits in a VLI is 63,
* thus the vli argument must be at maximum of UINT64_MAX / 2. You should * thus the vli argument must be less than or equal to UINT64_MAX / 2. You
* use LZMA_VLI_MAX for clarity. * should use LZMA_VLI_MAX for clarity.
*/ */
/* /*

View File

@ -110,7 +110,7 @@ lzma_block_header_encode(const lzma_block *block, uint8_t *out)
size_t filter_count = 0; size_t filter_count = 0;
do { do {
// There can be at maximum of four filters. // There can be a maximum of four filters.
if (filter_count == LZMA_FILTERS_MAX) if (filter_count == LZMA_FILTERS_MAX)
return LZMA_PROG_ERROR; return LZMA_PROG_ERROR;

View File

@ -155,7 +155,7 @@ validate_chain(const lzma_filter *filters, size_t *count)
} while (filters[++i].id != LZMA_VLI_UNKNOWN); } while (filters[++i].id != LZMA_VLI_UNKNOWN);
// There must be 1-4 filters. The last filter must be usable as // There must be 1-4 filters. The last filter must be usable as
// the last filter in the chain. At maximum of three filters are // the last filter in the chain. A maximum of three filters are
// allowed to change the size of the data. // allowed to change the size of the data.
if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3) if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
return LZMA_OPTIONS_ERROR; return LZMA_OPTIONS_ERROR;

View File

@ -143,7 +143,7 @@ typedef struct {
/// maximum possible length. /// maximum possible length.
size_t match_len_max; size_t match_len_max;
/// Match finder will search matches of at maximum of this length. /// Match finder will search matches up to this length.
/// This must be less than or equal to match_len_max. /// This must be less than or equal to match_len_max.
size_t nice_len; size_t nice_len;
@ -170,9 +170,9 @@ typedef struct {
// also take longer. // also take longer.
// //
// A single encoder loop in the LZ-based encoder may call the match finder // A single encoder loop in the LZ-based encoder may call the match finder
// (mf_find() or mf_skip()) at maximum of after_size times. // (mf_find() or mf_skip()) at most after_size times. In other words,
// In other words, a single encoder loop may advance lzma_mf.read_pos at // a single encoder loop may increment lzma_mf.read_pos at most after_size
// maximum of after_size times. Since matches are looked up to // times. Since matches are looked up to
// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total // lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
// amount of extra buffer needed after dict_size becomes // amount of extra buffer needed after dict_size becomes
// after_size + match_len_max. // after_size + match_len_max.
@ -270,7 +270,7 @@ mf_skip(lzma_mf *mf, uint32_t amount)
} }
/// Copies at maximum of *left amount of bytes from the history buffer /// Copies at most *left number of bytes from the history buffer
/// to out[]. This is needed by LZMA2 to encode uncompressed chunks. /// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
static inline void static inline void
mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size, mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,

View File

@ -361,14 +361,14 @@ progress_sizes_helper(char **pos, size_t *left, uint64_t value, bool final)
// Allow high precision only for the final message, since it looks // Allow high precision only for the final message, since it looks
// stupid for in-progress information. // stupid for in-progress information.
if (final) { if (final) {
// At maximum of four digits is allowed for exact byte count. // A maximum of four digits are allowed for exact byte count.
if (value < 10000) { if (value < 10000) {
my_snprintf(pos, left, "%s B", my_snprintf(pos, left, "%s B",
uint64_to_str(value, 0)); uint64_to_str(value, 0));
return; return;
} }
// At maximum of five significant digits is allowed for KiB. // A maximum of five significant digits are allowed for KiB.
if (value < UINT64_C(10239900)) { if (value < UINT64_C(10239900)) {
my_snprintf(pos, left, "%s KiB", double_to_str( my_snprintf(pos, left, "%s KiB", double_to_str(
(double)(value) / 1024.0)); (double)(value) / 1024.0));
@ -523,51 +523,51 @@ progress_remaining(uint64_t in_pos, uint64_t elapsed)
// Select appropriate precision for the estimated remaining time. // Select appropriate precision for the estimated remaining time.
if (remaining <= 10) { if (remaining <= 10) {
// At maximum of 10 seconds remaining. // A maximum of 10 seconds remaining.
// Show the number of seconds as is. // Show the number of seconds as is.
snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining); snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
} else if (remaining <= 50) { } else if (remaining <= 50) {
// At maximum of 50 seconds remaining. // A maximum of 50 seconds remaining.
// Round up to the next multiple of five seconds. // Round up to the next multiple of five seconds.
remaining = (remaining + 4) / 5 * 5; remaining = (remaining + 4) / 5 * 5;
snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining); snprintf(buf, sizeof(buf), "%" PRIu32 " s", remaining);
} else if (remaining <= 590) { } else if (remaining <= 590) {
// At maximum of 9 minutes and 50 seconds remaining. // A maximum of 9 minutes and 50 seconds remaining.
// Round up to the next multiple of ten seconds. // Round up to the next multiple of ten seconds.
remaining = (remaining + 9) / 10 * 10; remaining = (remaining + 9) / 10 * 10;
snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s", snprintf(buf, sizeof(buf), "%" PRIu32 " min %" PRIu32 " s",
remaining / 60, remaining % 60); remaining / 60, remaining % 60);
} else if (remaining <= 59 * 60) { } else if (remaining <= 59 * 60) {
// At maximum of 59 minutes remaining. // A maximum of 59 minutes remaining.
// Round up to the next multiple of a minute. // Round up to the next multiple of a minute.
remaining = (remaining + 59) / 60; remaining = (remaining + 59) / 60;
snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining); snprintf(buf, sizeof(buf), "%" PRIu32 " min", remaining);
} else if (remaining <= 9 * 3600 + 50 * 60) { } else if (remaining <= 9 * 3600 + 50 * 60) {
// At maximum of 9 hours and 50 minutes left. // A maximum of 9 hours and 50 minutes left.
// Round up to the next multiple of ten minutes. // Round up to the next multiple of ten minutes.
remaining = (remaining + 599) / 600 * 10; remaining = (remaining + 599) / 600 * 10;
snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min", snprintf(buf, sizeof(buf), "%" PRIu32 " h %" PRIu32 " min",
remaining / 60, remaining % 60); remaining / 60, remaining % 60);
} else if (remaining <= 23 * 3600) { } else if (remaining <= 23 * 3600) {
// At maximum of 23 hours remaining. // A maximum of 23 hours remaining.
// Round up to the next multiple of an hour. // Round up to the next multiple of an hour.
remaining = (remaining + 3599) / 3600; remaining = (remaining + 3599) / 3600;
snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining); snprintf(buf, sizeof(buf), "%" PRIu32 " h", remaining);
} else if (remaining <= 9 * 24 * 3600 + 23 * 3600) { } else if (remaining <= 9 * 24 * 3600 + 23 * 3600) {
// At maximum of 9 days and 23 hours remaining. // A maximum of 9 days and 23 hours remaining.
// Round up to the next multiple of an hour. // Round up to the next multiple of an hour.
remaining = (remaining + 3599) / 3600; remaining = (remaining + 3599) / 3600;
snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h", snprintf(buf, sizeof(buf), "%" PRIu32 " d %" PRIu32 " h",
remaining / 24, remaining % 24); remaining / 24, remaining % 24);
} else if (remaining <= 999 * 24 * 3600) { } else if (remaining <= 999 * 24 * 3600) {
// At maximum of 999 days remaining. ;-) // A maximum of 999 days remaining. ;-)
// Round up to the next multiple of a day. // Round up to the next multiple of a day.
remaining = (remaining + 24 * 3600 - 1) / (24 * 3600); remaining = (remaining + 24 * 3600 - 1) / (24 * 3600);
snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining); snprintf(buf, sizeof(buf), "%" PRIu32 " d", remaining);
@ -1157,7 +1157,7 @@ message_help(bool long_help)
if (long_help) { if (long_help) {
printf(_( printf(_(
"On this system and configuration, this program will use at maximum of roughly\n" "On this system and configuration, this program will use a maximum of roughly\n"
"%s MiB RAM and "), uint64_to_str(hardware_memlimit_get() / (1024 * 1024), 0)); "%s MiB RAM and "), uint64_to_str(hardware_memlimit_get() / (1024 * 1024), 0));
printf(N_("one thread.\n\n", "%s threads.\n\n", printf(N_("one thread.\n\n", "%s threads.\n\n",
hardware_threadlimit_get()), hardware_threadlimit_get()),

View File

@ -103,7 +103,7 @@ help(void)
"\n" "\n"
"With no FILE, or when FILE is -, read standard input.\n" "With no FILE, or when FILE is -, read standard input.\n"
"\n" "\n"
"On this system and configuration, this program will use at maximum of roughly\n" "On this system and configuration, this program will use a maximum of roughly\n"
"%" PRIu64 " MiB RAM.\n" "%" PRIu64 " MiB RAM.\n"
"\n" "\n"
"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n" "Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n"