1355 Commits

Author SHA1 Message Date
pancake
fb0ec6ed00
Use stdint like if there was no yesterday ##refactor
* stdint is needed to build r2, so there's no need to keep using
  those weak basic types anymore, and we can just alias them
2022-01-09 19:48:16 +01:00
pancake
0c6d40c274 Improve the basic theme ##cons 2021-12-21 22:09:26 +01:00
Lazula
ad749a0b1a Fix static/R_API function definition formatting
* Remove spaces before parens
* Remove spaces after asterisks
2021-12-21 20:58:12 +01:00
Sergi Àlvarez i Capilla
6e2f15dcbc Fix all the known issues in the ayu theme ##cons
* Time to jump into the 'basic', one theme at a time
2021-12-21 20:08:27 +01:00
pancake
e6f2cd0b2a
Remove trailing spaces (#19460)
$ git grep ' $' | grep -v ^test/ | cut -d : -f 1 | sort -u > /tmp/trailing
$ for a in `cat /tmp/trailing` ; do sed -i -e 's/ *$//' $a ; done
2021-12-02 17:39:59 +01:00
pancake
4e4efef0f7
Improve the snow experience in panels mode ##cons 2021-11-29 00:42:10 +01:00
Lazula
2255bf8b5d Many indentation style fixes
* Change several 8-space indents to tabs
* Apply tab indent style when breaking long lines
* Move operators from EOL to start of next line
* Fix ternary formatting
2021-11-18 10:43:52 +01:00
pancake
3e032073a3
Fix null name maps, workaround msvc-asan compiler crash and acp/utf/wchar fixes for w32 2021-11-14 00:50:54 +01:00
Sergi Àlvarez i Capilla
b12bfc5cd8 Fix bluy dark color scheme 2021-11-05 16:07:00 +01:00
pancake
9539aa12f4 Fix buffer overflow in RConsPixel API affecting the braile renderer ##cons 2021-10-28 17:34:11 +02:00
Sergi Àlvarez i Capilla
23f2fdd21d Add lowercase seven-segmented-ascii-art alphabet for ?ea ##print 2021-10-27 01:54:43 +02:00
pancake
f6010a4ba1
Improve default theme ##cons (#19304) 2021-10-25 00:24:33 +02:00
pancake
30e6516a01
Add scr.prompt.tabhelp enabled by default ##cons 2021-10-24 03:20:12 +02:00
pancake
cf5cd6df56
Fix latest covs (#19259) 2021-10-19 10:49:11 +02:00
pancake
93f6b4cd3b
Initial work towards supporting mingw32/64 again ##build 2021-10-18 23:58:16 +02:00
pancake
d1320d3e6e
Use RUtil.Str.ss in disasm when scr.demo is set ##visual 2021-10-18 18:45:47 +02:00
Lazula
d12be9e614 Fix new defects and an overread
* Fix global variable overread in r_str_ss()
* Fix memory leak in grep ASCII art ~?ea
* Fix memory leak in @%
* Fix use-after-free in r_io_bank_del_map()
2021-10-12 21:53:05 +02:00
pancake
2423ced03c Implement ?ea and ~?ea to use the seven segment ascii art text rendering ##visual 2021-10-09 10:16:38 +02:00
pancake
f3563759ef
Move more context fields out of the globals ##cons
* Fix |H |T and | suffixes when webserver in background
* Ignore noflush in the RCons.flush() call
2021-09-30 01:04:03 +02:00
thymol0
6513ffa59f
Move the console flushing decision to the console context ##cons 2021-09-29 10:46:37 +02:00
pancake
27beba4761 Fix #19100 - RCons.isatty() renamed to RCons.is_tty() 2021-09-25 12:43:59 +02:00
Dennis Goodlett
7195616448 Fix potential NULL deref in r_cons_flush 2021-09-19 22:58:26 +02:00
pancake
d520902ce8 Add RCons.isWindows() and update mini graph test 2021-09-17 09:24:27 +02:00
pancake
b80c77e931
Fix arrow keys regression on windows prompt ##cons 2021-09-13 17:09:09 +02:00
pancake
f86bee1852 Fix null deref in RCons.grep 2021-09-13 10:52:49 +02:00
pancake
2f5d8c9cfb
Remove globals on input.c for w32 (#19074) 2021-09-13 10:44:21 +02:00
pancake
6fc305c5e6
Fix #19065 - Fix prompt input when using scr.color=0 ##cons (#19067) 2021-09-09 20:31:11 +02:00
pancake
bdef1223da
Fix recently regressed tests 2021-08-29 21:00:28 +02:00
pancake
8ba42d98da
Do not serialize the config everytime, expose and use utf8 and fix R2COLOR env ##shell 2021-08-29 19:01:34 +02:00
pancake
9912c3ee0b
Check if user interrupted the shell command in nested macros ##shell (#19015) 2021-08-25 16:20:50 +02:00
pancake
dd344717c9 'e cfg.editor=' == 'e cfg.editor=-' 2021-08-19 18:39:54 +02:00
pancake
50d84c4c02 Fix assert when using the internal line editor with no file 2021-08-19 18:17:39 +02:00
pancake
89173f99dc
Dont check out of bounds last chars ##cons 2021-08-18 13:35:23 +02:00
pancake
bd888a2edf Fix more vs warnings 2021-08-17 00:35:52 +00:00
pancake
0acb19b68a
Fix some warnings spotted by visual studio (#18985)
Co-authored-by: pancake <pancake@nopcode.org>
2021-08-16 20:45:17 +02:00
pancake
09033f4406
Honor faster ^D on interactive execution path ##cons (#18983) 2021-08-14 21:06:52 +02:00
László Vaskó
8ef090c017
r_cons_printf_list: fix potential busy loop (#18970)
In case the string to be written by `vsnprintf` including `\0`
termination equals to the length of the buffer, the code enters in a
busy loop. The original code seems to assume, that `vsnprintf` won't
terminate the string with `\0` character which it does.

The [documentation of `vsnprintf`
states](https://en.cppreference.com/w/c/io/vfprintf):

> `int vsnprintf( char *restrict buffer, size_t bufsz, const
> char *restrict format, va_list vlist );`
>
> Writes the results to a character string buffer. At most bufsz - 1
> characters are written. The resulting character string will be
> terminated with a null character, unless bufsz is zero. If bufsz is
> zero, nothing is written and buffer may be a null pointer, [...]

This means that the `size` variable should be set to the total
available length of the buffer, not `length - 1`. Furthermore on the
return value the manual writes:

> however the return value (number of bytes that would be written not
> including the null terminator) is still calculated and returned.

This means that the `written` size returned doesn't count the
terminating `\0` in the length, so the value of `written` can be at
most `size - 1` before truncating the output. In other words a string
having`size = written + 1` would fit exactly in the buffer.

Also as `vsnprintf` will write the terminating `\0` there is no need
to explicitly do that.
2021-08-10 00:31:20 +02:00
pancake
305145d37f Fix #18963 - Fix regression when pressing SUPR key in the prompt 2021-08-03 12:44:36 +02:00
pancake
39993b39d7 Fix arrow handling after fixing mouse clicking glitches ##cons 2021-07-27 11:25:47 +02:00
pancake
67d43c4865 Fix memleaks in RCons.grep 2021-07-26 12:40:25 +02:00
pancake
324a0ff77d Fix glitches when clicking in the hud ##visual 2021-07-26 11:14:09 +02:00
pancake
857b1bfce1
Add scr.hist.filter to toggle the filtered history up/down search ##shell (#18913)
* Introduced in f6f7728cf411a08bf81374aaf301b896c49ff842
2021-07-18 19:15:54 +02:00
pancake
ddb7842228
Improved reverse-search in command history ##shell 2021-07-18 18:37:23 +02:00
pancake
5f4c27f7f8
Initial implementation of ~.... for hudline prompt ##visual (#18861)
* Add new RCons.hud.line(_string) APIs
2021-06-28 00:13:15 +02:00
pancake
7c14bac05b
Add initial support for building r2 on WASI ##build 2021-06-20 17:14:43 +02:00
Sergi Àlvarez i Capilla
d20b1ac8de Fix memleak when allocation fails in RCons.input 2021-06-10 22:40:03 +02:00
pancake
f49ba3a948
Reduce stackframe usage in exchange for the heap for portability (#18824) 2021-06-10 16:13:38 +02:00
pancake
02b6d5d4f0 Fix RCons grep regression 2021-05-30 21:28:50 +02:00
Murphy
70d533b488
Fix grep cmd with neg (#18763) ##cons 2021-05-30 10:29:33 +02:00
pancake
d90510f951 Fix more recently introduced memleaks 2021-05-21 11:17:32 +02:00