mirror of
https://git.disroot.org/80486DX2-66/polonium.git
synced 2024-12-27 07:30:23 +05:30
main.c: reformat help text for improved readability in source code
This commit is contained in:
parent
ff06576b72
commit
44bc736d96
89
src/main.c
89
src/main.c
@ -189,58 +189,55 @@ int main(int argc, char** argv) {
|
|||||||
if (argc < 2 || args_match(argv[argc - 1], ARGS_HELP)) {
|
if (argc < 2 || args_match(argv[argc - 1], ARGS_HELP)) {
|
||||||
char* program_name = my_basename(argv[0]);
|
char* program_name = my_basename(argv[0]);
|
||||||
printf(
|
printf(
|
||||||
"Usage: %s <file to corrupt> [parameters] [options]\n"
|
"Usage: %s <file to corrupt> [parameters] [options]\n"
|
||||||
" OR\n"
|
" OR\n"
|
||||||
" %s <-h | -help | --help>\n"
|
" %s <-h | -help | --help>\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Both parameters and options are optional.\n"
|
"Both parameters and options are optional.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"[parameters]:\n"
|
"[parameters]:\n"
|
||||||
" -probability : Determines the likelihood of a neutron "
|
" -probability : Determines the likelihood of a neutron radiation event\n"
|
||||||
"radiation event\n"
|
" occurring. The higher the value, the more likely the bits "
|
||||||
" occurring. The higher the value, the more likely "
|
"are\n"
|
||||||
"the bits are\n"
|
" to be corrupted.\n"
|
||||||
" to be corrupted.\n"
|
" Value range: [1..%" PRIu16 "]\n"
|
||||||
" Value range: [1..%" PRIu16 "]\n"
|
" Default value: %" PRIu16 "\n"
|
||||||
" Default value: %" PRIu16 "\n"
|
"\n"
|
||||||
"\n"
|
" -threshold : Controls the amount of change allowed for each byte. The\n"
|
||||||
" -threshold : Controls the amount of change allowed for each "
|
" higher the value, the more extensive the modifications will "
|
||||||
"byte. The\n"
|
"be.\n"
|
||||||
" higher the value, the more extensive the "
|
" Value range: [1.." INT2STR(CHAR_BIT) "]\n"
|
||||||
"modifications will be.\n"
|
" Default value: %" PRIu8 "\n"
|
||||||
" Value range: [1.." INT2STR(CHAR_BIT) "]\n"
|
"\n"
|
||||||
" Default value: %" PRIu8 "\n"
|
" -passes : Determines the number of times the file will be processed. "
|
||||||
"\n"
|
"The\n"
|
||||||
" -passes : Determines the number of times the file will be "
|
" higher the value, the longer the overall processing time "
|
||||||
"processed. The\n"
|
"will\n"
|
||||||
" higher the value, the longer the overall "
|
" be.\n"
|
||||||
"processing time will\n"
|
" Value range: [1..%" PRIuMAX "]\n"
|
||||||
" be.\n"
|
" Default value: %" PRIuMAX "\n"
|
||||||
" Value range: [1..%" PRIuMAX "]\n"
|
"\n"
|
||||||
" Default value: %" PRIuMAX "\n"
|
"[options]:\n"
|
||||||
"\n"
|
" -noconfirm : (Caution!) Do not ask user to confirm deletion\n"
|
||||||
"[options]:\n"
|
"\n"
|
||||||
" -noconfirm : (Caution!) Do not ask user to confirm "
|
" -contents : Only corrupt contents of files (PNG, BMP, WAV)\n"
|
||||||
"deletion\n"
|
"\n"
|
||||||
"\n"
|
" -line-endings : Preserve line endings\n"
|
||||||
" -contents : Only corrupt contents of files (PNG, BMP, WAV)\n"
|
"\n"
|
||||||
"\n"
|
" -printable : Work only with printable ASCII characters\n"
|
||||||
" -line-endings : Preserve line endings\n"
|
"\n"
|
||||||
"\n"
|
" -seed : Specify a 32-bit seed for the PRNG. If you want to keep it\n"
|
||||||
" -printable : Work only with printable ASCII characters\n"
|
" random, set the option to `random`.\n"
|
||||||
"\n"
|
"\n"
|
||||||
" -seed : Specify a 32-bit seed for the PRNG. If you want "
|
" -verbose : Enable verbose output\n",
|
||||||
"to keep it\n"
|
|
||||||
" random, set the option to `random`.\n"
|
|
||||||
"\n"
|
|
||||||
" -verbose : Enable verbose output\n",
|
|
||||||
program_name,
|
program_name,
|
||||||
program_name,
|
program_name,
|
||||||
UINT16_MAX,
|
UINT16_MAX,
|
||||||
probability,
|
probability,
|
||||||
threshold,
|
threshold,
|
||||||
(uintmax_t) SIZE_MAX,
|
(uintmax_t) SIZE_MAX,
|
||||||
passes);
|
passes
|
||||||
|
);
|
||||||
free(program_name);
|
free(program_name);
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user