Skip to content

Commit

Permalink
fix weird compiler errors from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmealey committed Oct 29, 2023
1 parent 21e3193 commit 844bdd2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions trurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,13 @@ static int getarg(struct option *o,
urlfile(o, arg);
*usedarg = true;
}
else if(checkoptarg("-a", flag, arg) || checkoptarg("--append", flag, arg)) {
else if(checkoptarg(o, "-a", flag, arg) ||
checkoptarg(o, "--append", flag, arg)) {
appendadd(o, arg);
*usedarg = true;
}
else if(checkoptarg("-s", flag, arg) || checkoptarg("--set", flag, arg)) {
else if(checkoptarg(o, "-s", flag, arg) ||
checkoptarg(o, "--set", flag, arg)) {
setadd(o, arg);
*usedarg = true;
}
Expand All @@ -482,7 +484,8 @@ static int getarg(struct option *o,
trimadd(o, arg);
*usedarg = true;
}
else if(checkoptarg("-g", flag, arg) || checkoptarg("--get", flag, arg)) {
else if(checkoptarg(o, "-g", flag, arg) ||
checkoptarg(o, "--get", flag, arg)) {
if(o->format)
errorf(o, ERROR_FLAG, "only one --get is supported");
if(o->jsonout)
Expand Down Expand Up @@ -512,12 +515,12 @@ static int getarg(struct option *o,
o->keep_port = true;
else if(!strcmp("--punycode", flag)) {
if(o->puny2idn)
errorf(ERROR_FLAG, "--punycode is mutually exclusive with --as-idn");
errorf(o, ERROR_FLAG, "--punycode is mutually exclusive with --as-idn");
o->punycode = true;
}
else if(!strcmp("--as-idn", flag)) {
if(o->punycode)
errorf(ERROR_FLAG, "--as-idn is mutually exclusive with --punycode");
errorf(o, ERROR_FLAG, "--as-idn is mutually exclusive with --punycode");
o->puny2idn = true;
}
else if(!strcmp("--no-guess-scheme", flag))
Expand Down Expand Up @@ -671,13 +674,13 @@ static void get(struct option *o, CURLU *uh)
mods |= VARMODIFIER_DEFAULT;
else if(!strncmp(ptr, "puny:", cl - ptr + 1)) {
if(mods & VARMODIFIER_PUNY2IDN)
errorf(ERROR_GET,
errorf(o, ERROR_GET,
"puny modifier is mutually exclusive with idn");
mods |= VARMODIFIER_PUNY;
}
else if(!strncmp(ptr, "idn:", cl - ptr + 1)) {
if(mods & VARMODIFIER_PUNY)
errorf(ERROR_GET,
errorf(o, ERROR_GET,
"idn modifier is mutually exclusive with puny");
mods |= VARMODIFIER_PUNY2IDN;
}
Expand Down

0 comments on commit 844bdd2

Please sign in to comment.