64 Commits

Author SHA1 Message Date
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 a9bf4aae2bdca2c139f482c3f0e098fe6ece1ee0.
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
452669d94113 ("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 3bfa61946eca ("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
Álvaro Felipe Melchor
01fe87d467 fix coverity and some coding style 2016-07-21 22:56:58 +02:00
Jeffrey Crowell
365547ef82 libr/core/yank.c fix memleak 2016-07-01 01:00:06 -04:00
Sven Steinbauer
547f8bbc5c Infer fixes Round 2 (#4993) 2016-05-24 22:22:15 +02:00
Davide Balzarotti
86760900b1 Added color support for the hud.
- Fix issue #3570

* new matching algorithm (list of space-separated words, case insensitive)
  - Fix bug #4704
* refactoring some code
* updated copyright
2016-04-28 14:02:22 +02:00
pancake
d4d6b1e1ff Implement new commands: yl, yw, ywx, wz, and re-fix .q 2016-03-31 05:42:37 +02:00
pancake
4b72511f6a Implement ys to show clipboard as string 2016-03-31 05:15:20 +02:00
pancake
40e08dbd89 Get rid of _Bool 2015-12-01 12:39:12 +01:00
pancake
b515a34676 More stdboolification 2015-09-14 12:35:38 +02:00
Álvaro Felipe Melchor
21ca91839f Fix #2806 2015-06-24 14:11:00 +02:00
jvoisin
123a77c022 Coverifix 2015-02-11 19:05:28 +01:00
condret
7ce6922491 rename r_io_open -> r_io_open_nomap and add a new r_io_open that creates a map at 0x0 2014-09-06 23:08:16 +02:00
condret
517323db0b fix w32 build
http://sourceforge.net/p/mingw/bugs/1912/   <-- lol
2014-06-02 15:31:03 +02:00
pancake
5e33a8a282 Initial huge refactoring of r_io still work in progress 2014-05-28 04:34:12 +02:00
jvoisin
5d9ee36a47 Fix CID 1195076 and a gcc warning 2014-05-24 02:01:53 +02:00
Andrew McDonnell
127a5c23e4 Implement yz feature and fix memory leak and invalid pointer issue 2014-05-23 15:35:49 -05:00
Anton Kochkov
2ef5cc49f9 Fix CID 1134968 2014-05-02 15:01:38 +04:00
pancake
08d94e38e1 Plugins are now loaded from API, not from Core constructor 2014-04-03 12:43:30 +02:00
Adam Pridgen
f8679bb888 Fixed yank from file RCoreFile swap, and fixed logic bug in io.c that would prevent file swaps 2014-04-02 13:10:03 -05:00
Adam Pridgen
fa683fbfd0 Added a java command to find all CP Object References in Functions, disabled debug code in yank 2014-03-22 20:20:58 -05:00
Adam Pridgen
12dd493f6d extended yank command so that offset and len did not need to be specified 2014-03-22 15:44:21 -05:00
pancake
aa30ed647f Fix #719 - Fixes in yank and uncrustify indentation rules 2014-03-22 00:37:25 +01:00
Adam Pridgen
204f29ac84 patience is a virtue, deeso 2014-03-21 17:27:17 -05:00
Adam Pridgen
2e2e2eaac2 remove yank_off (ha) 2014-03-21 15:29:44 -05:00
Adam Pridgen
940db1cf75 Added the ability to yank a file into a buffer without loading it 2014-03-20 23:25:39 -05:00
Adam Pridgen
b144099451 RCore yank_buf is now a RBuffer with a defined API. Tweaked RBuffer so it reallocs buffers correctly. Modified io_zip to write through on new files. 2014-03-20 13:09:37 -05:00
pancake
5ecf422335 Fix two more segfaults reported by zlul 2013-11-14 04:15:40 +01:00
pancake
42a8bb440e Fix #345 - fix some segfaults in yank and num.c 2013-09-05 05:10:57 +02:00
pancake
0903ccc9f4 Fix #337 - Fix 'y -1' segfault 2013-11-10 22:57:08 +01:00