fix seed parsing and help text

This commit is contained in:
2025-07-03 12:12:50 +02:00
parent 259860e998
commit 2a749714e5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ options:
-w, --width image width (default: 1920) -w, --width image width (default: 1920)
-h, --height image height (default: 1080) -h, --height image height (default: 1080)
-o, --output output file (default: output.bmp) -o, --output output file (default: output.bmp)
-seed random seed (default: time based) --seed random seed (default: time based)
-p, --pixel pixel size (default: random) -p, --pixel pixel size (default: random)
-s, --slope slope [0-255] (default: random) -s, --slope slope [0-255] (default: random)
-c, --color base color [0-255,0-255,0-255] (default: random) -c, --color base color [0-255,0-255,0-255] (default: random)
+2 -2
View File
@@ -32,7 +32,7 @@ void print_help(int status_code) {
" -w, --width image width (default: 1920)\n" " -w, --width image width (default: 1920)\n"
" -h, --height image height (default: 1080)\n" " -h, --height image height (default: 1080)\n"
" -o, --output output file (default: output.bmp)\n" " -o, --output output file (default: output.bmp)\n"
" -seed random seed (default: time based)\n" " --seed random seed (default: time based)\n"
" -p, --pixel pixel size (default: random)\n" " -p, --pixel pixel size (default: random)\n"
" -s, --slope slope [0-255] (default: random)\n" " -s, --slope slope [0-255] (default: random)\n"
" -c, --color base color [0-255,0-255,0-255] (default: random)\n" " -c, --color base color [0-255,0-255,0-255] (default: random)\n"
@@ -99,7 +99,7 @@ unsigned short parse_ushort(char *arg, char *value) {
return (unsigned short)tmp_value; return (unsigned short)tmp_value;
} }
unsigned short parse_ulong(char *arg, char *value) { unsigned long parse_ulong(char *arg, char *value) {
if (!is_number(value)) { if (!is_number(value)) {
invalid_value(arg, value); invalid_value(arg, value);
} }