aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/pkgbuild: bump version to 1.6.41.6.4releases/1.6Daniel Eklöf2021-02-12-2/+2
|
* changelog: prepare for 1.6.4Daniel Eklöf2021-02-12-3/+1
|
* selection: don’t strip formatting C0 control characters in bracketed paste modeDaniel Eklöf2021-02-12-18/+29
| | | | | | | | It’s ok to let the receiving end handle formatting C0 control characters in bracketed paste mode. In fact, we *must* let them through. Otherwise it is impossible to paste e.g. tabs into editors and similar applications.
* changelog: use standard signals for SIGCHLDDaniel Eklöf2021-02-12-0/+3
|
* config: selection-target: space-optimize the static ‘value’ arrayDaniel Eklöf2021-02-12-1/+1
|
* doc: foot.ini: selection-target=none|primary|clipboard|bothDaniel Eklöf2021-02-12-6/+11
|
* changelog: selection-target=none|primary|clipboard|bothDaniel Eklöf2021-02-12-0/+8
|
* config: add ‘none’ as a possible value for ‘selection-target’Daniel Eklöf2021-02-12-12/+22
| | | | | | | When ‘selection-target’ is set to ‘none’, selecting text does not copy the text to _any_ clipboard. This patch also refactors the value parsing to be data driven.
* selection: copy selected text to the target configured by ‘selection-target’Daniel Eklöf2021-02-12-1/+14
| | | | Closes #288
* config: add new option ‘selection-target’Daniel Eklöf2021-02-12-0/+23
| | | | | This option controls the clipboard target that selected text should be copied to.
* reaper: monitor SIGCHLD using the FDM instead of via a signalfdDaniel Eklöf2021-02-12-139/+91
| | | | | | | | | | | | | | | | | | | | | | | In addition to letting the FDM do the low-level signal watching, this patch also fixes a bug; multiple SIGCHLDs, be it delivered either through a signal, or via a signalfd, can be coalesced, like all signals. This means we need to loop on waitpid() with WNOHANG until there are no more processes to reap. This in turn requires a small change to the way reaper callbacks are implemented. Previously, the callback was allowed to do the wait(). This was signalled back to the reaper through the callback’s return value. Now, since we’ve already wait():ed, the process’ exit status is passed as an argument to the reaper callback. The callback for the client application has been updated accordingly; it sets a flag in the terminal struct, telling term_destroy() that the process has already been wait():ed on, and also stores the exit status.
* render: block all signals in the rendering threadsDaniel Eklöf2021-02-12-0/+5
|
* main: monitor SIGINT+SIGTERM using the FDMDaniel Eklöf2021-02-12-9/+10
|
* fdm: add support for managing signalsDaniel Eklöf2021-02-12-26/+147
| | | | | | | | | | | | | | | | | | Add fdm_signal_add() and fdm_signal_del(). Signals added to the fdm will be monitored, and the provided callback called as “soon as possible” from the main context (i.e not from the signal handler context). Monitored signals are *blocked* by default. We use epoll_pwait() to unblock them while we’re polling. This allows us to do race-free signal detection. We use a single handler for all monitored signals; the handler simply updates the signal’s slot in a global array (sized to fit SIGRTMAX signals). When epoll_pwait() returns EINTR, we loop the global array. The callback associated with each signal that fired is called.
* install: add -Dterminfo to list of compile-time optionsDaniel Eklöf2021-02-12-3/+4
|
* changelog: -Dterminfo changed from boolean to feature optionDaniel Eklöf2021-02-12-0/+2
|
* meson: convert -Dterminfo from a boolean to a feature optionDaniel Eklöf2021-02-12-5/+5
| | | | Patch from Jan Beich
* ime: Reset terminal's IME state on text_input.leaveTadeo Kondrak2021-02-12-0/+12
| | | | | | | | To reproduce issue: - Launch an IME from inside foot - Type in some preedit text - Use Ctrl-C to close the IME - IME text stays in terminal until focus is changed
* changelog: add section for 1.6.4Daniel Eklöf2021-02-12-0/+11
|
* meson/pkgbuild: bump version to 1.6.31.6.3Daniel Eklöf2021-01-29-2/+2
|
* changelog: prepare for 1.6.3Daniel Eklöf2021-01-29-3/+1
|
* Send text_input_rectangle requests for text-inputTadeo Kondrak2021-01-29-1/+143
|
* ci: freebsd: don’t need -Wno-missing-braces anymoreDaniel Eklöf2021-01-29-4/+2
| | | | builds.sr.ht has been updated to FreeBSD-12.2
* selection: don’t replace \r\n and \n with \r in bracketed paste modeDaniel Eklöf2021-01-27-3/+14
|
* selection: no xassert() in the releases/1.6 branchDaniel Eklöf2021-01-26-1/+1
|
* search: match composed characters when extending the search string to the next word boundaryDaniel Eklöf2021-01-26-0/+13
|
* search: fix matching of multi-column charactersDaniel Eklöf2021-01-26-3/+14
| | | | | We were matching the sub-sequence SPACERs as if they were regular characters, which obviously failed.
* selection: remove duplicate ‘ESC’ in switch caseDaniel Eklöf2021-01-26-4/+0
|
* selection: DEL is 0x7f, not 0x1fDaniel Eklöf2021-01-26-1/+1
|
* selection: codespell: stript -> stripDaniel Eklöf2021-01-26-1/+1
|
* selection: strip non-formatting C0, BS, HT and DEL from pasted textDaniel Eklöf2021-01-26-0/+19
|
* selection: unbreak text/uri-list decoding: we’re not using \r, not \nDaniel Eklöf2021-01-26-1/+1
| | | | | | | | Before passing the pasted text to the decoder, we now replace \r\n, and \n, with \r. The URI decoder was looking for a \n, which meant we failed to split up the list and instead pasted a single “multi-line” URI.
* selection: replace \r\n and \n with \r, and strip \e from pasted textDaniel Eklöf2021-01-26-3/+27
| | | | | Closes #305 Closes #306
* ime: fix rendering of pre-edit cursor when positioned after the pre-edit stringDaniel Eklöf2021-01-26-9/+25
| | | | | | | | | | | | We failed to convert the byte-indices to cell indices, resulting in a box cursor covering the entire pre-edit string. Note that in addition to fixing the translation from byte index to cell index, the rendered had to be updated to dirty one extra cell from the original grid. Without this, we left trailing cursors behind us when the user deleted text from the pre-edit string.
* search: ad-hoc workaround for combining characters with positive x-offsetsDaniel Eklöf2021-01-26-2/+9
| | | | | | | | | | | | When rendering the search input box, do the same ad-hoc workaround for combining characters with a positive x-offset as we do when rendering normal grid cells. In this case, we don’t *know* when we’re dealing with combining characters. But we can detect zero-width characters. For these, check their glyph’s x-offset. If positive, adjust it like we do when rendering combining glyphs in the main grid, to ensure the glyph is positioned over the _previous_ character, not the next.
* changelog: high cpu usage while holding down e.g. arrow keys in search modeDaniel Eklöf2021-01-26-0/+2
|
* search: don’t re-scan the scrollback unless the search string actually has changedDaniel Eklöf2021-01-26-36/+80
|
* search: fix matching against composed charactersDaniel Eklöf2021-01-26-3/+38
|
* changelog: search input box no longer accepts non-printablesDaniel Eklöf2021-01-26-0/+1
|
* search: filter out non-printable charactersDaniel Eklöf2021-01-26-4/+16
| | | | Don’t allow non-printable characters in the search input string.
* terminal: fix encoding of mouse buttons 6 and 7 in mouse eventsDaniel Eklöf2021-01-26-5/+2
| | | | | | | | | | | | | | | | | These two buttons were encoded using the *exact* same numbers as button 4 and 5 (scroll wheel up/down), making it impossible to distinguish them. The relevant section from XTerm’s control sequences documentation is: Some wheel mice can send additional button events, e.g., by tilting the scroll wheel left and right. Additional buttons are encoded like the wheel mice, o by adding 64 (for buttons 6 and 7), or o by adding 128 (for buttons 8 through 11).
* changelog: add bug ref to the ‘FreeBSD support’ entryDaniel Eklöf2021-01-23-1/+1
|
* changelog: freebsd supportDaniel Eklöf2021-01-23-0/+2
|
* ci: freebsd-x64: compile with -Wno-missing-bracesDaniel Eklöf2021-01-23-2/+4
| | | | | | | | The freebsd/latest image is still FreeBSD-12, with clang-8. It generate false positive warnings: ../../foot/search.c:357:21: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] mbstate_t ps = {0};
* shm: don’t check for __i386__ and __x86_64__ - there are other architectures out thereDaniel Eklöf2021-01-23-11/+11
| | | | | Instead, check for __SIZEOF_POINTER__ == 8, since what we’re really interested in is whether we have enough virtual address space or not.
* client: explicitly use a 64-bit type for ‘total_len’Daniel Eklöf2021-01-23-1/+1
| | | | | | | | 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 >= 1llu << (8 * sizeof(uint32_t)) || ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* completions/zsh: unbreak with BSD find(1)Jan Beich2021-01-23-2/+2
| | | | find: -printf: unknown primary or operator
* ci: enable freebsd-x64 jobJan Beich2021-01-23-5/+6
| | | | | - Add missing dependencies - Disable terminfo to match downstream
* meson: optionalize terminfo dependencyJan Beich2021-01-23-10/+22
| | | | | | | | ncurses on FreeBSD still uses termcap(5) while foot works fine with xterm-256color sans status line and visible bell. Having more than one ncurses version installed may break other applications. Document -Dterminfo=false uses --term=xterm-256color by default
* meson: depend on wayland-client when using wayland-protocolsJan Beich2021-01-23-2/+2
| | | | | | | | | | | | | | | | | | | | Base compiler on BSDs doesn't look where packages are installed to avoid tainting build environment. When system fcft is installed to the same prefix as wayland-client it passes CFLAGS that satisfy both but when using subprojects/fcft there's a build error. xdg-shell.c:33:10: fatal error: 'wayland-util.h' file not found xdg-decoration-unstable-v1.c:28:10: fatal error: 'wayland-util.h' file not found xdg-output-unstable-v1.c:28:10: fatal error: 'wayland-util.h' file not found presentation-time.c:28:10: fatal error: 'wayland-util.h' file not found primary-selection-unstable-v1.c:28:10: fatal error: 'wayland-util.h' file not found text-input-unstable-v3.c:33:10: fatal error: 'wayland-util.h' file not found In file included from ../../foot/grid.c:1: In file included from ../../foot/grid.h:5: In file included from ../../foot/terminal.h:19: ../../foot/wayland.h:8:10: fatal error: 'wayland-client.h' file not found In file included from ../../foot/selection.c:1: ../../foot/selection.h:4:10: fatal error: 'wayland-client.h' file not found
* meson: require epoll-shim on BSDsJan Beich2021-01-23-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | epoll/timerfd are Linux-only but BSDs have a shim via kqueue. libwayland on FreeBSD uses epoll-shim by default, so the build may fail at linking instead of compilation stage. csi.c:13:10: fatal error: 'sys/timerfd.h' file not found #include <sys/timerfd.h> ^~~~~~~~~~~~~~~ selection.c:10:10: fatal error: 'sys/epoll.h' file not found #include <sys/epoll.h> ^~~~~~~~~~~~~ terminal.c:15:10: fatal error: 'sys/epoll.h' file not found #include <sys/epoll.h> ^~~~~~~~~~~~~ ld: error: undefined symbol: timerfd_create >>> referenced by pgo.c:154 (pgo/pgo.c:154) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced by pgo.c:158 (pgo/pgo.c:158) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced by terminal.c:2022 (terminal.c:2022) >>> terminal.c.o:(cursor_blink_rearm_timer) in archive libpgolib.a >>> referenced 7 more times ld: error: undefined symbol: epoll_shim_close >>> referenced by pgo.c:160 (pgo/pgo.c:160) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced by pgo.c:258 (pgo/pgo.c:258) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced by pgo.c:277 (pgo/pgo.c:277) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced 14 more times ld: error: undefined symbol: epoll_shim_read >>> referenced by pgo.c:251 (pgo/pgo.c:251) >>> pgo.p/pgo_pgo.c.o:(main) >>> referenced by terminal.c:237 (terminal.c:237) >>> terminal.c.o:(fdm_ptmx) in archive libpgolib.a >>> referenced by terminal.c:363 (terminal.c:363) >>> terminal.c.o:(fdm_blink) in archive libpgolib.a >>> referenced 8 more times ld: error: undefined symbol: timerfd_settime >>> referenced by terminal.c:301 (terminal.c:301) >>> terminal.c.o:(fdm_ptmx) in archive libpgolib.a >>> referenced by terminal.c:309 (terminal.c:309) >>> terminal.c.o:(fdm_ptmx) in archive libpgolib.a >>> referenced by terminal.c:2041 (terminal.c:2041) >>> terminal.c.o:(cursor_blink_rearm_timer) in archive libpgolib.a >>> referenced 11 more times ld: error: undefined symbol: timerfd_gettime >>> referenced by selection.c:1165 (selection.c:1165) >>> selection.c.o:(selection_start_scroll_timer) in archive libpgolib.a
* meson: libpthread may lack C11 threads e.g., on FreeBSDJan Beich2021-01-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ld: error: undefined symbol: mtx_init >>> referenced by terminal.c:579 (terminal.c:579) >>> terminal.c.o:(initialize_render_workers) in archive libpgolib.a ld: error: undefined symbol: thrd_create >>> referenced by terminal.c:595 (terminal.c:595) >>> terminal.c.o:(initialize_render_workers) in archive libpgolib.a >>> referenced by terminal.c:935 (terminal.c:935) >>> terminal.c.o:(reload_fonts) in archive libpgolib.a >>> did you mean: thr_create >>> defined in: /lib/libc.so.7 ld: error: undefined symbol: mtx_lock >>> referenced by terminal.c:1410 (terminal.c:1410) >>> terminal.c.o:(term_destroy) in archive libpgolib.a ld: error: undefined symbol: mtx_unlock >>> referenced by terminal.c:1427 (terminal.c:1427) >>> terminal.c.o:(term_destroy) in archive libpgolib.a ld: error: undefined symbol: thrd_join >>> referenced by terminal.c:1462 (terminal.c:1462) >>> terminal.c.o:(term_destroy) in archive libpgolib.a >>> referenced by terminal.c:947 (terminal.c:947) >>> terminal.c.o:(reload_fonts) in archive libpgolib.a ld: error: undefined symbol: mtx_destroy >>> referenced by terminal.c:1466 (terminal.c:1466) >>> terminal.c.o:(term_destroy) in archive libpgolib.a
* meson: don't force POSIX complianceJan Beich2021-01-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | foot uses a number of functions not in any POSIX version. On non-glibc systems defining _POSIX_C_SOURCE usually hides non-compliant interfaces. In file included from grid.c:1: In file included from grid.h:4: terminal.h:45:15: error: expected parameter declarator static_assert(sizeof(struct attributes) == 8, "bad size"); ^ terminal.h:45:15: error: expected ')' terminal.h:45:14: note: to match this '(' static_assert(sizeof(struct attributes) == 8, "bad size"); ^ terminal.h:45:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] static_assert(sizeof(struct attributes) == 8, "bad size"); ^ terminal.h:55:15: error: expected parameter declarator static_assert(sizeof(struct cell) == 12, "bad size"); ^ terminal.h:55:15: error: expected ')' terminal.h:55:14: note: to match this '(' static_assert(sizeof(struct cell) == 12, "bad size"); ^ terminal.h:55:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] static_assert(sizeof(struct cell) == 12, "bad size"); ^ grid.c:317:32: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int width = max(1, wcwidth(wc)); ^ grid.c:317:32: note: did you mean '__wcwidth'? /usr/include/_ctype.h:161:1: note: '__wcwidth' declared here __wcwidth(__ct_rune_t _c) ^ selection.c:1695:9: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(fds, O_CLOEXEC) == -1) { ^ selection.c:1695:9: note: did you mean 'pipe'? /usr/include/unistd.h:358:6: note: 'pipe' declared here int pipe(int *); ^ selection.c:1842:9: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(fds, O_CLOEXEC) == -1) { ^ selection.c:2129:9: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(fds, O_CLOEXEC) == -1) { ^ vt.c:241:12: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] assert(wcwidth(c) == 1); ^ vt.c:241:12: note: did you mean '__wcwidth'? /usr/include/_ctype.h:161:1: note: '__wcwidth' declared here __wcwidth(__ct_rune_t _c) ^ vt.c:544:17: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int width = wcwidth(wc); ^ csi.c:713:35: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] const int width = wcwidth(term->vt.last_printed); ^ csi.c:713:35: note: did you mean '__wcwidth'? /usr/include/_ctype.h:161:1: note: '__wcwidth' declared here __wcwidth(__ct_rune_t _c) ^ ime.c:169:25: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int width = max(wcwidth(term->ime.preedit.text[i]), 1); ^ ime.c:169:25: note: did you mean '__wcwidth'? /usr/include/_ctype.h:161:1: note: '__wcwidth' declared here __wcwidth(__ct_rune_t _c) ^ quirks.c:81:22: error: implicit declaration of function 'strcasestr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] is_kde = strcasestr(cur_desktop, "kde") != NULL; ^ quirks.c:81:53: error: comparison between pointer and integer ('int' and 'void *') [-Werror,-Wpointer-integer-compare] is_kde = strcasestr(cur_desktop, "kde") != NULL; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~ config.c:89:15: error: expected ')' static_assert(ALEN(binding_action_map) == BIND_ACTION_COUNT, ^ util.h:5:18: note: expanded from macro 'ALEN' #define ALEN(v) (sizeof(v) / sizeof((v)[0])) ^ config.c:358:12: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return strcasecmp(s, "on") == 0 || ^ config.c:358:12: note: did you mean 'wcscasecmp'? /usr/include/wchar.h:223:5: note: 'wcscasecmp' declared here int wcscasecmp(const wchar_t *, const wchar_t *); ^ config.c:510:23: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] bool center = strcasecmp(mode, "center") == 0; ^ config.c:1243:13: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (strcasecmp(value, "none") == 0) { ^ config.c:1330:13: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (strcasecmp(value, "none") == 0) { ^ config.c:1534:13: error: implicit declaration of function 'strcasecmp' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (strcasecmp(value, "none") == 0) { ^ spawn.c:20:9: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(pipe_fds, O_CLOEXEC) < 0) { ^ spawn.c:20:9: note: did you mean 'pipe'? /usr/include/unistd.h:358:6: note: 'pipe' declared here int pipe(int *); ^ spawn.c:52:5: error: implicit declaration of function 'static_assert' is invalid in C99 [-Werror,-Wimplicit-function-declaration] static_assert(sizeof(_errno) == sizeof(errno), "errno size mismatch"); ^ server.c:309:21: error: implicit declaration of function 'accept4' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int client_fd = accept4( ^ server.c:309:21: note: did you mean 'accept'? /usr/include/sys/socket.h:679:5: note: 'accept' declared here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict); ^ server.c:310:59: error: use of undeclared identifier 'SOCK_CLOEXEC' server->fd, (struct sockaddr *)&addr, &addr_size, SOCK_CLOEXEC | SOCK_NONBLOCK); ^ server.c:310:74: error: use of undeclared identifier 'SOCK_NONBLOCK' server->fd, (struct sockaddr *)&addr, &addr_size, SOCK_CLOEXEC | SOCK_NONBLOCK); ^ server.c:341:44: error: use of undeclared identifier 'SOCK_CLOEXEC' int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); ^ server.c:341:59: error: use of undeclared identifier 'SOCK_NONBLOCK' int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); ^ server.c:371:44: error: use of undeclared identifier 'SOCK_CLOEXEC' int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); ^ server.c:371:59: error: use of undeclared identifier 'SOCK_NONBLOCK' int fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); ^ shm.c:138:26: error: use of undeclared identifier '_SC_PAGE_SIZE' long n = sysconf(_SC_PAGE_SIZE); ^ shm.c:279:15: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:279:15: note: did you mean 'timer_create'? /usr/include/time.h:170:5: note: 'timer_create' declared here int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict); ^ shm.c:279:60: error: use of undeclared identifier 'MFD_CLOEXEC' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:279:74: error: use of undeclared identifier 'MFD_ALLOW_SEALING' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:350:15: error: use of undeclared identifier 'F_SEAL_GROW' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:350:29: error: use of undeclared identifier 'F_SEAL_SHRINK' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:350:71: error: use of undeclared identifier 'F_SEAL_SEAL' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:349:24: error: use of undeclared identifier 'F_ADD_SEALS' if (fcntl(pool_fd, F_ADD_SEALS, ^ slave.c:151:28: error: implicit declaration of function 'ptsname' is invalid in C99 [-Werror,-Wimplicit-function-declaration] const char *pts_name = ptsname(ptmx); ^ slave.c:151:28: note: did you mean 'ttyname'? /usr/include/unistd.h:371:7: note: 'ttyname' declared here char *ttyname(int); ^ slave.c:151:17: error: incompatible integer to pointer conversion initializing 'const char *' with an expression of type 'int' [-Werror,-Wint-conversion] const char *pts_name = ptsname(ptmx); ^ ~~~~~~~~~~~~~ slave.c:153:9: error: implicit declaration of function 'grantpt' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (grantpt(ptmx) == -1) { ^ slave.c:157:9: error: implicit declaration of function 'unlockpt' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (unlockpt(ptmx) == -1) { ^ slave.c:252:9: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (pipe2(fork_pipe, O_CLOEXEC) < 0) { ^ slave.c:252:9: note: did you mean 'pipe'? /usr/include/unistd.h:358:6: note: 'pipe' declared here int pipe(int *); ^ render.c:1166:28: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int width = max(1, wcwidth(cell->wc)); ^ render.c:1166:28: note: did you mean '__wcwidth'? /usr/include/_ctype.h:161:1: note: '__wcwidth' declared here __wcwidth(__ct_rune_t _c) ^ render.c:1932:9: error: implicit declaration of function 'gettimeofday' is invalid in C99 [-Werror,-Wimplicit-function-declaration] gettimeofday(&start_time, NULL); ^ render.c:2240:28: error: implicit declaration of function 'wcwidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] widths[i] = max(1, wcwidth(text[i])); ^ render.c:2243:32: error: implicit declaration of function 'wcswidth' is invalid in C99 [-Werror,-Wimplicit-function-declaration] const size_t total_cells = wcswidth(text, text_len); ^ render.c:2243:32: note: did you mean 'wcwidth'? render.c:1166:28: note: 'wcwidth' declared here int width = max(1, wcwidth(cell->wc)); ^ util.h:7:27: note: expanded from macro 'max' #define max(x, y) ((x) > (y) ? (x) : (y)) ^ input.c:1540:9: error: implicit declaration of function 'gettimeofday' is invalid in C99 [-Werror,-Wimplicit-function-declaration] gettimeofday(&now, NULL); ^
* render: set thread name in a portable wayJan Beich2021-01-23-2/+8
| | | | | | | | | | | | | | | | | | prctl is Linux-only but pthread_setname_np is same as PR_SET_NAME. Solaris and FreeBSD >= 13 have pthread_setname_np similar to Linux. DragonFly, OpenBSD, FreeBSD < 13 lack pthread_setname_np but provide pthread_set_name_np which doesn't return a value. NetBSD requires 3 arguments for pthread_setname_np where the last one is void *. render.c:8:10: fatal error: 'sys/prctl.h' file not found #include <sys/prctl.h> ^~~~~~~~~~~~~ render.c:1234:9: error: implicit declaration of function 'prctl' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0) ^ render.c:1234:15: error: use of undeclared identifier 'PR_SET_NAME' if (prctl(PR_SET_NAME, proc_title, 0, 0, 0) < 0) ^
* shm: unbreak build without memfd_createJan Beich2021-01-23-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New FreeBSD versions have memfd_create but other BSDs don't. pgo/pgo.c:260:22: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int mem_fd = memfd_create("foot-pgo-ptmx", MFD_CLOEXEC); ^ pgo/pgo.c:260:52: error: use of undeclared identifier 'MFD_CLOEXEC' int mem_fd = memfd_create("foot-pgo-ptmx", MFD_CLOEXEC); ^ shm.c:13:10: fatal error: 'linux/mman.h' file not found #include <linux/mman.h> ^~~~~~~~~~~~~~ shm.c:277:15: error: implicit declaration of function 'memfd_create' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:277:60: error: use of undeclared identifier 'MFD_CLOEXEC' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:277:74: error: use of undeclared identifier 'MFD_ALLOW_SEALING' pool_fd = memfd_create("foot-wayland-shm-buffer-pool", MFD_CLOEXEC | MFD_ALLOW_SEALING); ^ shm.c:339:15: error: use of undeclared identifier 'F_SEAL_GROW' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:339:29: error: use of undeclared identifier 'F_SEAL_SHRINK' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:339:71: error: use of undeclared identifier 'F_SEAL_SEAL' F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0) ^ shm.c:338:24: error: use of undeclared identifier 'F_ADD_SEALS' if (fcntl(pool_fd, F_ADD_SEALS, ^
* shm: disable fallocate optimization if not supportedJan Beich2021-01-23-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shm.c:301:26: error: implicit declaration of function 'fallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration] can_punch_hole = fallocate( ^ shm.c:302:22: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' pool_fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 1) == 0; ^ shm.c:302:45: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' pool_fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, 0, 1) == 0; ^ shm.c:432:9: error: implicit declaration of function 'fallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (fallocate( ^ shm.c:434:13: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^ shm.c:434:36: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^ shm.c:501:9: error: implicit declaration of function 'fallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (fallocate( ^ shm.c:503:13: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^ shm.c:503:36: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^ shm.c:597:9: error: implicit declaration of function 'fallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (fallocate( ^ shm.c:599:13: error: use of undeclared identifier 'FALLOC_FL_PUNCH_HOLE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^ shm.c:599:36: error: use of undeclared identifier 'FALLOC_FL_KEEP_SIZE' FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, ^
* shm: silence -Wunused-function on i386Jan Beich2021-01-23-0/+2
| | | | | | shm.c:134:1: error: unused function 'page_size' [-Werror,-Wunused-function] page_size(void) ^
* slave: skip e310487dae99 if not supportedJan Beich2021-01-23-0/+2
| | | | | | slave.c:188:26: error: use of undeclared identifier 'IUTF8' flags.c_iflag |= IUTF8; ^
* uri: switch to conservative maximum hostname lengthJan Beich2021-01-23-1/+1
| | | | | | | | Current maximum is provided by sysconf(_SC_HOST_NAME_MAX) instead. uri.c:269:20: error: use of undeclared identifier 'HOST_NAME_MAX' char this_host[HOST_NAME_MAX]; ^
* terminal: add/exclude missing headersJan Beich2021-01-23-0/+3
| | | | | | | | | | | | terminal.c:3:10: fatal error: 'malloc.h' file not found #include <malloc.h> ^~~~~~~~~~ terminal.c:1512:9: error: implicit declaration of function 'sigaction' is invalid in C99 [-Werror,-Wimplicit-function-declaration] sigaction(SIGALRM, &(const struct sigaction){.sa_handler = &sig_alarm}, NULL); ^ terminal.c:1532:21: error: implicit declaration of function 'kill' is invalid in C99 [-Werror,-Wimplicit-function-declaration] kill(term->slave, kill_signal); ^
* client/server: switch to POSIX header for sockaddr_unJan Beich2021-01-23-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | client.c:13:10: fatal error: 'linux/un.h' file not found #include <linux/un.h> ^~~~~~~~~~~~ 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 <linux/un.h> ^~~~~~~~~~~~ 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}; ^
* main: correct header for mode macrosJan Beich2021-01-23-1/+1
| | | | | | | | | | | | | | | | | | main.c:13:10: fatal error: 'sys/sysinfo.h' file not found #include <sys/sysinfo.h> ^~~~~~~~~~~~~~~ main.c:122:28: error: use of undeclared identifier 'S_IRUSR' S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) { ^ main.c:122:38: error: use of undeclared identifier 'S_IWUSR' S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) { ^ main.c:122:48: error: use of undeclared identifier 'S_IRGRP' S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) { ^ main.c:122:58: error: use of undeclared identifier 'S_IROTH' S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) { ^
* input: don’t enable keyboard repeat timer when repeat rate is zeroDaniel Eklöf2021-01-21-0/+4
| | | | | | | | | | wayland-client-protocol.h: Negative values for either rate or delay are illegal. A rate of zero will disable any repeating (regardless of the value of delay). This fixes a division-by-zero crash.
* Add xsnprintf() and remove some unnecessary strlen(3) callsCraig Barnes2021-01-21-36/+86
|
* sixel: current geometry: don’t exceed current window dimensionsDaniel Eklöf2021-01-21-1/+4
| | | | | This is similar to what XTerm does, and fixes an issue with lsix, where the output did not wrap.
* readme: add IME to the feature listDaniel Eklöf2021-01-21-0/+1
|
* selection: uri decode: move zero-length check into decode_one_uri()Daniel Eklöf2021-01-21-2/+4
|
* changelog: add hyphen between ‘newline’ and ‘terminated’Daniel Eklöf2021-01-21-2/+3
|
* changelog: pasting non-newline terminated text/uri-list offersDaniel Eklöf2021-01-21-0/+2
|
* changelog: glyhps -> glyphsDaniel Eklöf2021-01-21-1/+1
|
* selection: add a ‘finish’ function, called at the end of receiving clipboard dataDaniel Eklöf2021-01-21-0/+24
| | | | | This is necessary to decode the final URI in a text/uri-list offer if it hasn’t been newline terminated.
* selection: URI decoder: break out decoding of a single URIDaniel Eklöf2021-01-21-27/+29
|
* reaper: remove child from list *before* calling the user provided callbackDaniel Eklöf2021-01-21-9/+11
| | | | | | | | | The user provided callback may call reaper_del(), in which case we will crash when we also try to remove the child from the list. Remove it from the list before the callback means reaper_del() (if called by the callback) will just loop through the entire list without finding the pid and thus do nothing.
* term: remove client application’s pid from reaper when shutting downDaniel Eklöf2021-01-21-0/+3
| | | | | | | | | | When we are shutting down the terminal, we explicitly wait for the child application to terminate (with a timeout, after which the child process is killed). I.e. there’s no need to let the reaper handle it. In fact, doing so leads to a crash since we will have destroyed (and thus free:d) the terminal instance when the reaper callback is called.
* pgo: stub implementation of reaper_del()Daniel Eklöf2021-01-21-0/+1
|
* reaper: add reaper_del() - pid is no longer watched/monitored after thisDaniel Eklöf2021-01-21-0/+12
|
* wayland: take rotation into account when calculating the logical PPIDaniel Eklöf2021-01-21-0/+21
|
* Add fish completionFollieHiyuki2021-01-21-0/+42
|
* render: sixel: fix assertion: x/y coords may be outside visible areaDaniel Eklöf2021-01-21-2/+2
| | | | But when they are, width/height must be 0.
* render: codespell: accomodate -> accommodateDaniel Eklöf2021-01-21-1/+1
|
* render: draw combining characters on top of colored bitmap glyphs (emoji)Daniel Eklöf2021-01-21-16/+36
|
* input: don’t try to close an invalid FDDaniel Eklöf2021-01-21-3/+4
|
* input: don’t assert when receiving a button release without a press eventDaniel Eklöf2021-01-21-1/+20
|
* uri: rename nibbletohex() function to hex2nibble()Craig Barnes2021-01-21-3/+3
| | | | It converts a hex digit to a nibble, not the other way around.
* uri: use nibble2hex() instead of isxdigit(3) to check valid hex digitsCraig Barnes2021-01-21-4/+6
|
* Add myself to ContributorsPeter Colberg2021-01-21-0/+1
|
* Require trailing comment to be preceded by a space or tabPeter Colberg2021-01-21-3/+19
| | | | | | Fixes `word-delimiters` option to not ignore `#` and subsequent characters. Closes #270
* render: mark cell overflowed into as dirtyDaniel Eklöf2021-01-21-1/+13
| | | | | | | | | | | | | | | | When tweak.allow-overflowing-double-width-glyphs=yes, then certain glyphs are allowed to overflow into the neighbouring cell. However, if the cell “owning” the double-width glyph is erased (_only_ that cell), then the cell overflowed into is not redrawn, causing part of the double-width glyph to remain on screen. To avoid checking for these glyphs when printing to the terminal (i.e at parse time), simply mark both cells as dirty when we render the overflowing glyph. Yes, this means that the cells will always be re-rendered. We count on them only making up a small portion of the screen.
* doc: foot.ini: remove FONT FORMAT section, expand description of ‘font’Daniel Eklöf2021-01-21-12/+11
|
* foot.ini: add (default) size to fontDaniel Eklöf2021-01-21-1/+1
|
* ci: run codespell on README/INSTALL/CHANGELOGDaniel Eklöf2021-01-21-2/+3
|
* ci: run codespell on the man pages (the source files)Daniel Eklöf2021-01-21-2/+2
|
* changelog: update ‘contributors’Daniel Eklöf2021-01-21-0/+2
|
* Fix typoBirger Schacht2021-01-21-1/+1
| | | | programatically -> programmatically
* ime: don’t call text-input functions when it isn’t availableDaniel Eklöf2021-01-21-0/+8
| | | | Closes #259
* wayland: log warning when compositor does not implement text-inputDaniel Eklöf2021-01-21-0/+7
|
* terminal: reaper callback: don’t close ptmx if already closedDaniel Eklöf2021-01-21-2/+5
|
* terminal: shutdown (or --hold) when the client process terminatesDaniel Eklöf2021-01-21-6/+28
| | | | | | | | | Shutdown the terminal when the client process terminates, not when the ptmx file descriptor is closed. This fixes an issue where the terminal remains running after the client process has terminated, if it spawned child processes that inherited the ptmx file descriptor.
* reaper: add optional callbackDaniel Eklöf2021-01-21-20/+39
| | | | | | | | | When calling ‘reaper_add()’, the caller can provide a callback. If non-NULL, the reaper will call the callback to handle the actual reaping. If the callback is NULL, or if it returns false, the reaper reaps the child process.
* readme: add builds.sr.ht status badgeDaniel Eklöf2021-01-21-0/+2
|