Fix misplaced comments and typos

This commit is contained in:
2024-08-23 03:11:43 +02:00
parent ef9638ce29
commit d81cbab314

View File

@@ -63,7 +63,8 @@ static size_t charset_index(char ch)
fprintf(stderr, "%s: invalid char %d\n", __func__, ch); fprintf(stderr, "%s: invalid char %d\n", __func__, ch);
abort(); abort();
} }
/* calculate incidence of coincidence of `text`
/* calculate index of coincidence of `text`
* *
* map will transform the characters before calculating the ioc. For example, * map will transform the characters before calculating the ioc. For example,
* ioc(data, ..., tolower) will transform samples with tolower before checking * ioc(data, ..., tolower) will transform samples with tolower before checking
@@ -182,9 +183,9 @@ int main(int argc, char** argv)
/* Find key length (stride) /* Find key length (stride)
* ========================*/ * ========================*/
/* values better than threshold immidiately break the loop */
int key_len = 1; int key_len = 1;
{ {
/* values better than threshold immidiately break the loop */
constexpr double threshold = 1.6; constexpr double threshold = 1.6;
double best_score = -1.0; double best_score = -1.0;