Commit Graph

331 Commits

Author SHA1 Message Date
Boris Faure a29e7a718a
termptyesc: _handle_xterm_set_color_class() gets obj==NULL in tests
+ simplify _handle_xterm_10_command()
2020-11-15 20:10:43 +01:00
Boris Faure 05b95705ae
termptyesc: export termptyesc_safechar() 2020-11-15 13:48:20 +01:00
Boris Faure 7881e66b98
color class: ensure operations work 2020-11-15 12:27:40 +01:00
Boris Faure 11abaaa0b4
termio/termptyesc: clean up mess with color classes 2020-11-15 00:15:10 +01:00
Boris Faure f0404cd5fd
termptyesc: handle xterm 12 to change cursor color 2020-11-14 23:32:41 +01:00
Boris Faure 75bbf1e3e2
termptyesc: simplify code. CID1431130 2020-10-11 15:02:59 +02:00
Boris Faure 19fb6afd73
mv src/bin/col.{c,h} src/bin/colors.{c,h} 2020-08-20 16:21:51 +02:00
Boris Faure a56a76afc7
termptyesc: handle single osc arg 2020-07-15 21:11:05 +02:00
Boris Faure f29190bdaa
termptyesc: debug (re)setting cursor color + test
Do nothing for the moment. One could think about using color class for
that.
2020-07-06 23:57:37 +02:00
Boris Faure 9f2f8464f3
Fix typos
Summary: Fix some typos.

Differential Revision: https://phab.enlightenment.org/D12032
2020-07-05 20:19:59 +02:00
Boris Faure 3ee79131e4
termptyesc: no sanitize with musl when calling isnan() 2020-07-02 23:51:25 +02:00
Boris Faure c2dd1815c8
termptyesc: avoid issues with cast from double
+ no buffer overflow
2020-07-02 23:45:32 +02:00
Boris Faure ac9a92480b
termptyesc: handle xterm color format starting with "rgbi:" 2020-07-02 23:01:42 +02:00
Boris Faure 2245782dd4
termptyesc: handle xterm color format starting with "rgb:" 2020-07-02 22:33:34 +02:00
Boris Faure 8e31c28f9b
termptyesc: handle larger sharp-based colors + tests 2020-06-23 23:21:56 +02:00
Boris Faure ab35c9b7dd
mv utils.{c,h} theme.{c,h} 2020-06-23 12:48:27 +02:00
Boris Faure a6828665dc
termptyesc: oops 2020-06-23 00:09:54 +02:00
Boris Faure 196973fcd3
rewrite changing of background/foreground colors from escape codes 2020-06-22 23:41:27 +02:00
Boris Faure 171f99c80c
Merge branch 'terminology-1.7' 2020-06-16 21:12:37 +02:00
Boris Faure e7894a887f
termptyesc: fix issue found by fuzzing by Øyvind Kolås (pippin from GIMP) 2020-06-16 20:54:09 +02:00
Boris Faure db7ca27635
termptyesc: explicit conversions 2020-06-13 00:13:12 +02:00
Boris Faure abdef9786c
have define BINARY_TYFUZZ/BINARY_TYTEST 2020-05-24 18:05:39 +02:00
Boris Faure 876036f009
termptyesc: randomize new entry in the true color cache 2020-05-09 00:04:20 +02:00
Boris Faure 106f8b5c9a
termptyesc: handle terminal query
New, still debated on https://gitlab.freedesktop.org/terminal-wg/specifications/issues/8
2020-05-06 23:44:05 +02:00
Boris Faure f1857527da
termptyesc: mark _safechar() as pure 2020-04-25 15:20:54 +02:00
Boris Faure 18bfcb5aba
termptyesc: r,g,b are uint8_t 2020-04-22 23:59:02 +02:00
Boris Faure 00c427a20f
termptyesc: avoid issue with integer promotion
Found by UBSan:
sgr-truecolors.sh... ../src/bin/termptyesc.c:737:35: runtime error: left
shift of 244 by 24 places cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
../src/bin/termptyesc.c:737:35 in
2020-04-22 23:52:58 +02:00
Boris Faure f9b6f88be1
termptyesc: cache true color approximations
On my stupid benchmark ( https://github.com/billiob/fire ), this goes from
about 45 fps to about 125fps.
2020-04-22 23:43:45 +02:00
Boris Faure 5da6d66134
termptyesc: add missing debug line on bell 2020-04-06 22:58:48 +02:00
Alastair Poole bbf556f9b0 termptyesc: Add missing header.
We need to include utils.h for strchrnul if it doesn't exist on
the build system.
2020-01-03 12:56:28 +00:00
Boris Faure e6d3a848ef
utils: mv strchrnul() to utils.h from termptyesc.c 2019-12-08 20:51:23 +01:00
Boris Faure 992936d156
termptyesc: add title/icon stack + tests 2019-11-29 23:31:18 +01:00
Boris Faure a5aaeefc18
remove condition on if (X) eina_stringshare_del(X) 2019-11-29 23:31:14 +01:00
Boris Faure 2e75539fb9
termptyesc: handle invalid values for OSC + test
- missing value is as if 0
- overflow
- hex
- negative value
2019-11-25 20:07:00 +01:00
Boris Faure bde94adf21
termptyesc: rename csi_arg_error to esc_arg_error 2019-11-25 19:44:30 +01:00
Boris Faure 02f4173387 build: detect whether there is strchrnul
This should help compiling on macosx
2019-11-07 20:43:47 +01:00
Boris Faure e1ff4d877e termptyesc: store when tab are inserted and where they stop 2019-10-27 16:04:43 +01:00
Boris Faure c11f7e4c19 termptyesc: restrict DSR-DECCKSR argument to 16bit (unsigned) 2019-09-15 23:05:38 +02:00
Boris Faure dbf92b1346 termptyesc: use correct format specifier for int 2019-09-15 22:43:29 +02:00
Boris Faure 241c5b5944 termptyesc: use "ESC\", the 7-bit version of ST.
Ref T8054
2019-07-18 00:09:06 +02:00
Boris Faure 6a8a515c01 termptyesc: xterm is actually emitting \033 and not ST
ST is as described in https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Operating-System-Commands
2019-07-17 23:57:44 +02:00
Boris Faure 5e67443379 termptyesc: fix osc-11 reporting. It ends with ST
Closes T8054
2019-07-17 23:43:32 +02:00
Alastair Poole 18bff78895 build: Fix build and behaviour on OpenBSD.
Summary:
OpenBSD does not have strchrnul. Also, fix range
issue with window size.

The geometry is broken on OpenBSD and DragonFlyBSD.
A previous patch solved this issue. Range was
changed to <= 0, but needs to be <= 1 to  ensure
the terminal opens and displays content.

Reviewers: billiob

Reviewed By: billiob

Differential Revision: https://phab.enlightenment.org/D9157
2019-06-23 16:39:17 +02:00
Boris Faure 417cf716c6 termptyesc: handle some OSC where there's nothing to do 2019-05-27 19:20:28 +02:00
Boris Faure 16db713a44 termptyesc: just ignore screen mode 2019-05-27 19:20:09 +02:00
Boris Faure 50e1371006 termptyesc: osc 11's format is weird 2019-05-27 00:13:22 +02:00
Boris Faure 33b2d68aa9 termptyesc: handle OSC 11 that reports background color
It can also be used to set background color but that's not implemented
2019-05-26 23:02:53 +02:00
Boris Faure 6c55ecf1a1 termptyesc: fix hangs spotted by afl-fuzz + tests 2019-03-18 22:34:21 +01:00
Boris Faure c9b5c52a5d termptyesc: typo in comment 2019-03-03 22:49:11 +01:00
Boris Faure 36fcd2d2c4 tests: add tytest_termio_resize() 2019-03-03 18:22:18 +01:00