1
0
Fork 0
mirror of https://github.com/Raymo111/i3lock-color.git synced 2024-12-02 14:05:43 -05:00

Merge pull request #237 from cmsxbc/fix_greeter_wrong_args

fix(typo): fix wrong greeter_y_expr and  typo error message in arguments parser.
This commit is contained in:
Raymond Li 2021-09-10 23:47:03 -04:00 committed by GitHub
commit d78d22017a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -171,7 +171,7 @@ char verif_y_expr[32] = "iy\0";
char wrong_x_expr[32] = "ix\0";
char wrong_y_expr[32] = "iy\0";
char greeter_x_expr[32] = "ix\0";
char greeter_y_expr[32] = "ix\0";
char greeter_y_expr[32] = "iy\0";
double time_size = 32.0;
double date_size = 14.0;
@ -2044,7 +2044,7 @@ int main(int argc, char *argv[]) {
}
arg = optarg;
if (sscanf(arg, "%30[^:]:%30[^:]", wrong_x_expr, wrong_y_expr) != 2) {
errx(1, "verifpos must be of the form x:y\n");
errx(1, "wrongpos must be of the form x:y\n");
}
break;
case 544:
@ -2089,11 +2089,11 @@ int main(int argc, char *argv[]) {
case 548:
if (strlen(optarg) > 31) {
// this is overly restrictive since both the x and y string buffers have size 32, but it's easier to check.
errx(1, "indicator position string can be at most 31 characters\n");
errx(1, "greeter position string can be at most 31 characters\n");
}
arg = optarg;
if (sscanf(arg, "%30[^:]:%30[^:]", greeter_x_expr, greeter_y_expr) != 2) {
errx(1, "indpos must be of the form x:y\n");
errx(1, "greeterpos must be of the form x:y\n");
}
break;