Commit Graph

92 Commits

Author SHA1 Message Date
satk0
ebd8bf9042
Replace r_return_val_if_fail with uppercase alternative 2024-08-05 12:26:32 +02:00
pancake
058a96f9d4 Boolify the RCore.yank ##api 2023-10-23 19:58:26 +02:00
pancake
69af9f2f53 Remove few apis, commands and config vars marked as deprecated 2023-06-08 19:45:16 +02:00
Lazula
57812e2471
Drastically reduce eUsage counter ##shell
* Get rid of some eprintf
* Use RCoreHelpMessage
* Missing comma in cmd_cmp.c and vmenus.c
* cmd.c * cmd_anal.c * cmd_cmp.c * cmd_debug.c * cmd_eval.c
* cmd_flag.c * cmd_help.c * cmd_debug.c 2 * fixes * cmd_info.c
* cmd_log.c * cmd_meta.c * cmd_mount.c * cmd_open.c * cmd_print.c
* cconfig.c * cmd.c * cmd_anal.c * cmd_search.c * cmd_seek.c
* cmd_write.c * core_a2f.c * core_sixref.c * vmenus.c * yank.c
* Please sys/lint.sh
2023-03-09 16:07:09 +01:00
pancake
42805f6be0 Fix null deref in yank command 2023-03-06 19:42:56 +01:00
pancake
b673677a81 Fix UAF in y-;q and assert with 0 size functions ##crash 2023-03-06 14:01:12 +01:00
pancake
98f7b10439 Boolify r_core_yank_file_all() and fix shadow var bug ##api 2022-09-19 02:08:58 +02:00
pancake
a27aa03ff3 Add a public api for the yank-unset action ##api 2022-09-14 17:44:08 +02:00
pancake
6babe1f5af Improve the yank command and help ##shell 2022-09-03 02:18:54 +02:00
pancake
22a1266331 Implement y- command and some other indentation fixes ##shell 2022-08-18 17:14:19 +02:00
Paul B Mahol
dc28629707 Fix leak in some yanking cases ##util 2022-08-05 14:26:05 +02:00
pancake
091b7c96c2
Fix last covs and support mount in ms ##fs 2022-07-08 09:51:21 +02:00
pancake
ad1add71cb
Fix a new linting to remove the double error message in RLOG calls ##lint 2022-07-07 20:25:26 +02:00
Richard Patel
363df75c06
Replace some instances of eprintf with R_LOG_ 2022-06-28 02:49:42 +02:00
pancake
5b7c970f2b eprintf requires newline
* git grep eprintf | grep -v '\\n'| grep '('
2022-05-05 13:11:52 +02: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
condret
44e3ff56ce Remove r_io_map_new from public API ##io 2021-11-03 17:55:39 +01:00
condret
82ebbac993 Rename r_io_map_next_available to r_io_map_locate and add use_banks support ##io 2021-10-09 03:20:49 +02:00
pancake
3862fb7e82
Rename r_cons_memcat to r_cons_write ##api (#18559) 2021-04-10 22:21:35 +02:00
Liumeo
302f4949a6
Use pj in core ##refactor (#18267)
* Use pj in core ##refactor

* fix tests
2021-01-22 08:44:44 +01:00
Liumeo
a74ca8f07b
Remove core.file ##refactor (#18178) 2021-01-06 23:44:18 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
Anton Kochkov
afba51ce98 Fix format warnings in libr/core 2020-10-22 13:37:25 +08:00
Riccardo Schirone
c8f99840ab
r_core_seek accepts a boolean as 3rd argument (#16618)
Replaces all 0/1 passed as 3rd argument to r_core_seek with false/true.
2020-04-17 12:53:35 +02:00
Liumeo
388df51df2
Fix LGTM alert in yank command (#16506) 2020-04-10 11:47:52 +08:00
pancake
5677390ca6 Fix #10696 - Kill r_io_map_add_next_available
The function is just renamed to be reused and we have no tests for it, but it may fall into an infinite loop
2020-02-24 01:16:14 +01:00
Anton Kochkov
e11b2a9145
Some Coverity defect fixes (#15626) 2019-12-13 11:25:19 -06:00
pancake
48a2f990e9 Implement yq,yj,y*,y! and b* ##core 2019-05-07 01:24:43 +02:00
Riccardo Schirone
3f4580b031
Make buf field private in RBuffer (#13473)
* Fix pemixed build (and include it in meson build)
* Do not use base_priv in yank, it was wrongly used.
2019-03-26 20:32:53 +01:00
Riccardo Schirone
b0ac77881e
Make other RBuffer fields "private" (#13444)
* Use r_buf_size to get the size of a buffer, not the private field

* Use r_buf_seek instead of adjusting the private cur RBuffer field

* use r_buf_read instead of r_buf_read_at(.., cur, ..)

* other r_buf_read_at/r_buf_read

* Fix RBuffer usage in REgg

* Wrong replace with r_buf_resize

* Other r_buf_resize fixes

* style fixes

* other style fixes

* Introduce r_buf_tell API instead of using seek

* other style fixes

* style

* style 2

* write_at(cur) == write

* fixes

* avoid changing test

* Make most RBuffer fields private

* Add some fixme comments

* still use base_priv in some places
2019-03-20 19:01:26 +01:00
Riccardo Schirone
0948f9536b
Use r_buf_size to get the size of a buffer, not the private field (#13380)
* Use r_buf_size to get the size of a buffer, not the private field
* Use r_buf_seek instead of adjusting the private cur RBuffer field
* use r_buf_read instead of r_buf_read_at(.., cur, ..)
* Fix RBuffer usage in REgg
* Introduce r_buf_tell API instead of using seek
* write_at(cur) == write
2019-03-15 20:28:52 +01:00
0x0r
05b3887220 Update yank.c (#12787)
remove signed differences in r_core_yank_hexpair()
2019-01-15 09:17:21 +01:00
pancake
80f8526fdf Documentate yfx/yw/ywf/.. 2019-01-14 10:06:06 +01:00
pancake
c8339215c6 Implement yfx (yank from hexpair) command and r_core_yank_hexpair API ##core 2019-01-14 02:38:03 +01:00
Artem Zinenko
4a2bc97a35 Fix #11918 - Moved r_print.h into r_util/r_print.h 2018-11-14 10:54:22 +01:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
pancake
31ad955bab Use r_io_read_at instead of r_core_read_at which is now deprecated 2018-05-21 23:06:00 +02:00
Fangrui Song
1c4407cb69 Fix #8388 - Replace RIOMap::{from,to} with RAddrInterval itv. 2017-09-14 12:40:22 +02:00
condret
0161fa0ec2 make read_at bool again and implement RIOAccessLog for accurate error-handling
This reverts commit a9bf4aae2b.
2017-08-22 17:24:04 +00:00
Fangrui Song
a9bf4aae2b Misc fixes to siol (#8262)
* Fix onIterMap (divide-and-conquer like USACO Shaping Regions), check return values of every `op` call
* Change return types of r_io_read_at and friends back to `int`
* Fix some analysis tests and others
* Fix mem leaks
2017-08-22 10:46:48 +02:00
condret
2f201bded0 opsalamance - merge the big siol branch
- Thanks @MaskRay and @condret
2017-08-22 09:42:16 +02:00
alvarofe
2e462ec8f0 Bring RIODesc from SIOL and cleanup 2017-08-18 01:31:57 +00:00
Roi Martin
a1388159c8 Fix hexdump offset in zoom mode
Add argument zoomsz to r_print_hexdump(). It allows to specify the real
size of each byte in the hexdump.
2017-06-06 10:45:01 +02:00
pancake
55f1c0b4dd Fix #7108 - Implement anal.fcnprefix 2017-03-24 10:46:13 +01:00
pancake
0ae4a5c3e8 More r2-indent fixes. and reindent a bunch of files 2017-02-20 02:54:16 +01:00
pancake
4bbc73a0e2 Fix #6818 - json indent ~{} honors scr.color
- Cannot configure the color palette
2017-02-20 02:32:58 +01:00
pancake
70930f4496 Bring back the interest on sys/indent.sh 2017-02-10 02:05:58 +01:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
Chris Rorvick
9b47635f0c remove `next' param from r_core_block_read()
This was originally used to cause a seek to the next block prior to
reading such that successive calls to r_core_block_read() would progress
through memory one block at a time.  This was broken, though, by commit
452669d941 ("more cleanup in r_core_block_read") when when it used
`next' to directly calculate the offset rather than via a seek.

Only one call site remains that attempts to read the next block instead
of the current, and this probably was not even observable due to the
"hacky fix" added in commit 3bfa61946e ("Cleaner pvj, fix tinype load,
and honor 'ao N's").

The current of semantics of `next' appear to be broken and there is very
little dependence on it.  If the original behavior should be restored
anywhere, it would be much better to add a new function, or just do the
seek explicitly, rather than parameterizing r_core_block_read() on it.
2016-08-15 14:26:58 -05:00
Álvaro Felipe Melchor
8059f4be23 fix build 2016-07-21 23:15:52 +02:00