mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
xtgettcap: exit immediately when there are no capabilities to query for
This commit is contained in:
parent
4fca380585
commit
807e193854
1 changed files with 5 additions and 2 deletions
|
|
@ -67,10 +67,13 @@ unhexlify(char *dst, const char *src)
|
||||||
int
|
int
|
||||||
main(int argc, const char *const *argv)
|
main(int argc, const char *const *argv)
|
||||||
{
|
{
|
||||||
enable_raw_mode();
|
|
||||||
|
|
||||||
const size_t query_count = argc - 1;
|
const size_t query_count = argc - 1;
|
||||||
|
|
||||||
|
if (query_count == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
enable_raw_mode();
|
||||||
|
|
||||||
printf("\x1bP+q");
|
printf("\x1bP+q");
|
||||||
for (int i = 1; i < argc; i++)
|
for (int i = 1; i < argc; i++)
|
||||||
printf("%s%s", i > 1 ? ";" : "", hexlify(argv[i]));
|
printf("%s%s", i > 1 ? ";" : "", hexlify(argv[i]));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue