<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git/client.c, branch 1.8.0</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=1.8.0</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=1.8.0'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2021-06-24T15:50:44Z</updated>
<entry>
<title>client: add +/-graphemes to version output</title>
<updated>2021-06-24T15:50:44Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-24T15:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3f0f5ec3b7ee5bdbdc085f133920b83a611601b8'/>
<id>urn:sha1:3f0f5ec3b7ee5bdbdc085f133920b83a611601b8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: make sure ‘fd’ is initialized in all error paths</title>
<updated>2021-06-23T13:32:03Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T13:32:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=15e7e802456404d077bc23c6de01b5979f0a7484'/>
<id>urn:sha1:15e7e802456404d077bc23c6de01b5979f0a7484</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: add and use function push_override()</title>
<updated>2021-06-23T13:12:09Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T13:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5fc8275eb2385933a1f068a4476ddfc28afce584'/>
<id>urn:sha1:5fc8275eb2385933a1f068a4476ddfc28afce584</id>
<content type='text'>
We now track override data (length + malloc:ed string) in a struct,
and push this struct to our overrides linked list.

There’s a new function, push_override() that takes a string,
calculates its length, strdup() it and pushes it to the linked
list. This function also length-checks the string, to ensure we don’t
overflow.

This way, we don’t have to loop the overrides list twice; once when
calculating the total length of all overrides, and once when sending
the overrides to the server.

Now, we can update the total length as we add overrides (i.e while
parsing the command line, instead of afterwards).

This means we only have to loop the list once, and that’s when sending
it. This also means there’s no longer any need to malloc an array
holding the lengths of each override.
</content>
</entry>
<entry>
<title>client: implement -o,--override</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=63a64bdca1978814ade32949e4cbf0d9758e6cbe'/>
<id>urn:sha1:63a64bdca1978814ade32949e4cbf0d9758e6cbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: send overrides for everything that is publicly visible in the conf</title>
<updated>2021-06-23T13:12:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-06-23T12:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=136d60606a1e01eb68ed984de63b7a55f8966075'/>
<id>urn:sha1:136d60606a1e01eb68ed984de63b7a55f8966075</id>
<content type='text'>
Send a generic “overrides” list to the server, containing options in
text, on the format “section.key=value”.

This reduces the size of the base client/server protocol packet, as
well as opens up for a generic -o,--override command line option (not
yet implemented).
</content>
</entry>
<entry>
<title>main/client: change exit code</title>
<updated>2021-05-04T08:41:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-05-01T08:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=da923100cad1000252c87b02a4132ce5878a28ec'/>
<id>urn:sha1:da923100cad1000252c87b02a4132ce5878a28ec</id>
<content type='text'>
* foot exits with -26/230
* footclient exits with -36/220

This is to give each application a range of exit codes. Currently
unused, but we may want to change this in the future.
</content>
</entry>
<entry>
<title>foot/footclient: use a custom exit code when foot/footclient fail to run</title>
<updated>2021-05-04T08:40:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-04-30T20:47:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a1b41bd186147f3f028030e9079821d0bfa7b3f6'/>
<id>urn:sha1:a1b41bd186147f3f028030e9079821d0bfa7b3f6</id>
<content type='text'>
Normally, foot and footclient uses the exit code from the client
application (i.e. the shell).

However, foot (or footclient) itself may fail to run; if run outside
of a Wayland session, or no fonts are installed, or the client
application/shell cannot be found (“foot lsdjfldsjf”) etc.

Up until now, there has been no way to differentiate these kind of
failures from the client application exiting with code 1.

This patch changes foot’s failure exit code to -27/229, and
footclient’s to -28/228. Note that footclient will exit with foot’s
-27/229 if footclient ran successfully, but the foot server failed to
instantiate a new window.

Closes #466.
</content>
</entry>
<entry>
<title>features: --version now logs +/-pgo</title>
<updated>2021-03-26T19:30:13Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-26T19:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=9b20764f35094963ecbfc40a972ef54443630447'/>
<id>urn:sha1:9b20764f35094963ecbfc40a972ef54443630447</id>
<content type='text'>
That is, whether the binary was compiled with PGO or not.
</content>
</entry>
<entry>
<title>add option to detach the client process from the terminal instance</title>
<updated>2021-03-13T08:48:55Z</updated>
<author>
<name>Felipe Trzaskowski</name>
<email>felipe.trzaskowski@gmail.com</email>
</author>
<published>2021-03-12T23:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=3ed93142667f052909beae43463501df37a4dcca'/>
<id>urn:sha1:3ed93142667f052909beae43463501df37a4dcca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: repair usage output</title>
<updated>2021-03-12T20:53:11Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-12T20:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=464851fac1284095e33b6f00500d000ecdf2394d'/>
<id>urn:sha1:464851fac1284095e33b6f00500d000ecdf2394d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: remove excess ‘-’ from ‘--log-level’ in usage</title>
<updated>2021-03-12T20:51:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-03-12T20:51:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=84f840a1972288d59804bd62b9928575d86ac553'/>
<id>urn:sha1:84f840a1972288d59804bd62b9928575d86ac553</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: -D,--working-directory: check path exists and is a directory</title>
<updated>2021-02-13T09:48:58Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-13T09:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5b0ebee290393394d18337f9d707f6b532d3f2a5'/>
<id>urn:sha1:5b0ebee290393394d18337f9d707f6b532d3f2a5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>main/client: add -D,--working-directory=DIR</title>
<updated>2021-02-12T20:42:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T08:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=19868c9c8d29cba0f22dafcf9b92ffffc76bd1e7'/>
<id>urn:sha1:19868c9c8d29cba0f22dafcf9b92ffffc76bd1e7</id>
<content type='text'>
This overrides the CWD the slave process chdir()’s into before
exec:ing the client application.
</content>
</entry>
<entry>
<title>main/client: add missing short options to usage (--help output)</title>
<updated>2021-02-12T08:02:25Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-12T08:02:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=59b127dc6909399711aef48149f86845b46dbd1f'/>
<id>urn:sha1:59b127dc6909399711aef48149f86845b46dbd1f</id>
<content type='text'>
Initially, these options *did not* have short options. Then, in
e81388336750a20a2da98a57e9726c8ba1b481e3, the short options were added
to footclient’s getopt_long() call.

This was in a sense incorrect. But instead of reverting it, the short
options were made official in
8eaa1959904ecff0e7e75d152220344457912f76, by adding the short options
to foot, documenting them in the man pages, and adding them to the
shell completions.

Though the commit message of 8eaa1959904ecff0e7e75d152220344457912f76
says the options have now been included in usage(), they were in
fact *not* added to usage.

This patch does just that.
</content>
</entry>
<entry>
<title>main: client: factor out some common code for "--log-level" option</title>
<updated>2021-02-11T11:08:18Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-02-11T11:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5437321f97e21a3fc6fca79fbdf05ca8d6199b35'/>
<id>urn:sha1:5437321f97e21a3fc6fca79fbdf05ca8d6199b35</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: add -d,--log-level</title>
<updated>2021-02-09T20:22:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-02-09T20:07:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4d42094a64825b8c3ce63bfeb1a26ae5a128a460'/>
<id>urn:sha1:4d42094a64825b8c3ce63bfeb1a26ae5a128a460</id>
<content type='text'>
</content>
</entry>
<entry>
<title>client: explicitly use a 64-bit type for ‘total_len’</title>
<updated>2021-01-23T08:52:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2021-01-21T11:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=0bb928e02fa9ce4ec36cf2f1683e7a4e0c5e09dc'/>
<id>urn:sha1:0bb928e02fa9ce4ec36cf2f1683e7a4e0c5e09dc</id>
<content type='text'>
This fixes an out-of-range comparison in 32-bit builds:

 client.c:289:19: error: result of comparison of constant 4294967296 with expression of type 'size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
        if (total_len &gt;= 1llu &lt;&lt; (8 * sizeof(uint32_t)) ||
            ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</content>
</entry>
<entry>
<title>client/server: switch to POSIX header for sockaddr_un</title>
<updated>2021-01-21T11:00:02Z</updated>
<author>
<name>Jan Beich</name>
<email>jbeich@FreeBSD.org</email>
</author>
<published>2021-01-19T14:34:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=567a8de3b08392f049b6a2e3ce7d2a5a8ba4e0ed'/>
<id>urn:sha1:567a8de3b08392f049b6a2e3ce7d2a5a8ba4e0ed</id>
<content type='text'>
client.c:13:10: fatal error: 'linux/un.h' file not found
 #include &lt;linux/un.h&gt;
          ^~~~~~~~~~~~
client.c:195:24: error: variable has incomplete type 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
                       ^
client.c:195:12: note: forward declaration of 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
           ^
server.c:11:10: fatal error: 'linux/un.h' file not found
 #include &lt;linux/un.h&gt;
          ^~~~~~~~~~~~
server.c:307:24: error: variable has incomplete type 'struct sockaddr_un'
    struct sockaddr_un addr;
                       ^
server.c:307:12: note: forward declaration of 'struct sockaddr_un'
    struct sockaddr_un addr;
           ^
server.c:347:24: error: variable has incomplete type 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
                       ^
server.c:347:12: note: forward declaration of 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
           ^
server.c:394:24: error: variable has incomplete type 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
                       ^
server.c:394:12: note: forward declaration of 'struct sockaddr_un'
    struct sockaddr_un addr = {.sun_family = AF_UNIX};
           ^
</content>
</entry>
<entry>
<title>debug: rename assert() to xassert(), to avoid clashing with &lt;assert.h&gt;</title>
<updated>2021-01-16T20:16:00Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-16T20:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=e56136ce1192d04a52b01ccb41284f0b7896430e'/>
<id>urn:sha1:e56136ce1192d04a52b01ccb41284f0b7896430e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Print stack trace on assert() failure or when calling fatal_error()</title>
<updated>2021-01-16T19:56:33Z</updated>
<author>
<name>Craig Barnes</name>
<email>craigbarnes@protonmail.com</email>
</author>
<published>2021-01-15T20:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9'/>
<id>urn:sha1:22f25a9e4feddbc093ae01cd53bdda3c2c3a82e9</id>
<content type='text'>
Note: this uses the __sanitizer_print_stack_trace() function from the
AddressSanitizer runtime, so it only works when AddressSanitizer is
in use.
</content>
</entry>
</feed>
