Commit Graph

310 Commits

Author SHA1 Message Date
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 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
Boris Faure 490d388314 termptyesc: resize parameters were inverted 2019-03-03 15:55:01 +01:00
Boris Faure 1c9c2a19ed termptyesc: handle window manipulations that resizes the terminal
only for testing purpose
2019-02-27 23:46:04 +01:00
Boris Faure fd8120091d tytest: add framework to add special escape codes for tests 2019-02-06 23:19:29 +01:00
Boris Faure 3d82c70793 tests: get rid of that useless UTF8CC code
@glima: this should fix your issue
2019-02-06 22:35:12 +01:00
Boris Faure 09bd49ea34 termptyesc: better debug 2019-02-06 22:33:15 +01:00
Boris Faure 4eefb44ee1 termptyesc: handle DECSWBV + tests 2019-01-26 22:27:44 +01:00
Boris Faure 2ffbe38d43 termptyesc: support aliases for cursor Up/Left + tests 2019-01-20 20:09:32 +01:00
Boris Faure 7dccab5481 termptyesc: export VPA handler to its own function + tests 2019-01-20 18:44:08 +01:00
Boris Faure bef8cb1373 termptyesc: add debug on CUD or VPR 2019-01-20 18:35:03 +01:00
Boris Faure 392c04bbe0 termptyesc: support Unset Tab Stop (only VTE so far) + tests 2019-01-20 12:06:19 +01:00
Boris Faure 96bbfd054b termptyesc: export DA handler to its own function + tests
Also support DA3.
2019-01-19 23:50:31 +01:00
Boris Faure b7e84963c7 reindent code 2019-01-19 23:07:07 +01:00
Boris Faure 3833252ad2 termptyesc: extract REP handler to its own function + tests 2019-01-19 23:02:51 +01:00
Boris Faure a0738339dd termptyesc: CHA and HPA are the same 2019-01-19 22:10:12 +01:00
Boris Faure c1d030da0a termptyesc: extract CBT handler to its own function + tests 2019-01-13 00:08:52 +01:00
Boris Faure 89a6a9d652 termptyesc: extract ECH handler to its own function + test
Test is not fully working at the moment.
There seems to be an issue with appending text outside margins
2019-01-11 23:30:43 +01:00
Boris Faure ff830fbc42 termptyesc: extract TBC to its own function + tests 2019-01-08 23:16:06 +01:00
Boris Faure 395404c243 termptyesc: handle CTC + tests 2019-01-08 22:55:48 +01:00
Boris Faure 24cc5eaf8d termptyesc: Printer and Selective Erase are not supported 2019-01-07 23:39:34 +01:00
Boris Faure 5475920c56 termptyesc: add debug on sixel/regis graphics attributes 2019-01-07 23:31:31 +01:00
Boris Faure a2656754bd termptyesc: support DECST8C + tests 2019-01-07 23:13:52 +01:00