Commit graph

777 commits

Author SHA1 Message Date
Giovanni
dfdd062f14
Rewrite of zImage bin parser & new structured data methods (#5893) 2026-02-09 19:00:42 +08:00
Rot127
dcb4acf661
Rename clean -> clear to match common API names. (#5891) 2026-02-08 15:03:52 +00:00
Rot127
0d5e300874
librz/util: add clean() function to hash tables and sets. (#5889) 2026-02-08 14:42:48 +08:00
Rot127
aaf9588c44
Constify rz_set_u/s_contains() (#5888) 2026-02-08 14:40:14 +08:00
Anton Angelov
067e319bac
Use ht_xx_size() instead of reading ht internal state (#5885) 2026-02-07 16:17:18 +00:00
Khairul Azhar Kasmiran
0e6b255519
Remove deprecated rz_list_get_next() (#5879) 2026-02-06 21:57:33 +08:00
Anton Angelov
0ff186d8e2
Improve performance of mem.c::read_n_bits() (#5819)
* Add micro benchmark
* Add implementation for rz_bv_set_from_buffer_*()
* Implementation for BE host
* Fix incorrect size parameter when calling rz_bv_set_from_buffer
* Warning when reading beyond ST64_MAX
2026-01-26 12:19:21 +08:00
Rot127
65ef6e3ed9
Fix return type description. (#5838) 2026-01-25 13:11:11 +00:00
Rot127
4675f5cafe
Add getter for the current log level. (#5807)
The getter is useful if a module outputs debug logs buts also some updated status update in a single line with rz_cons_printf("\r...").
The status update should not happen if the log level is below warning.
2026-01-23 18:52:45 +00:00
Khairul Azhar Kasmiran
d9f41e8074
Shorten rz_list_iter_has_prev/next() to rz_list_has_prev/next() (#5822)
* Shorten rz_list_iter_has_prev() to rz_list_has_prev()

* Shorten rz_list_iter_has_next() to rz_list_has_next()
2026-01-21 13:53:43 +00:00
Florian Märkl
c594b413ff
Swap argument order of rz_bv_copy* (#5793)
This brings these copy functions in line with the more common order of
dst, src as used in memcpy and rz_bv_*_inplace functions.
This is a breaking change and callers of rz_bv_copy() and
rz_bv_copy_nbits() must adjust to the new order.
2026-01-14 23:18:34 +08:00
Anton Angelov
602781b2dc
Implement rz_sys_backtrace() for Windows/MSVC (#5784)
* Implement rz_sys_backtrace for Windows/MSVC
* Add dbghelp.lib to dependency list
2026-01-13 00:55:20 +08:00
Giovanni
141f05b126
Remove rz_io_read_at and use only rz_io_read_at_mapped (#5777) 2026-01-11 22:50:50 +08:00
Anton Angelov
b2fb8bbec5
Improve performance of rz_bv_add_inplace() (#5751)
* Add rz_bv_add_inplace benchmark for 256-bit vectors

* Improve performance of rz_bv_add

* Simplify helper function and fix bug

* Minor changes
2026-01-11 00:14:19 +00:00
Giovanni
6926b6a65d
Rewrite C compiler code for rz-gg (#5761) 2026-01-10 13:36:51 +08:00
Khairul Azhar Kasmiran
e4ed1d3436
Fix "exeeds" typo (#5760) 2026-01-09 21:26:26 +08:00
Rot127
960dc17b23
util/bitvector: return successfully for bit vector shift of 0. (#5747)
The result of shift with 0 is perfectly well defined.
2026-01-08 23:27:38 +08:00
Rot127
4213ddfecc
Fix reachable invalid state, for bitvector in-place casts from large to large. (#5746) 2026-01-08 13:47:53 +00:00
Maijin
797fcd0ff6
test: increase coverage for RzCons and its components (#5735)
- Added tests for Cons Canvas, Histogram, HUD, Pal, Pager, Pipe, RGB, HTML, Line.
- Fixed rz_str_ansi_filter null terminator bug.
- Refactored test_cons.c by splitting it into smaller files.
- Improved many existing assertions to verify actual output content.
- Restored mu_assert_notnull checks for better reliability.

Co-authored-by: Maijin <maijin21@gmail.com>
2026-01-07 12:27:45 +08:00
Rot127
a89bbe5cf2
librz/util: implement inplace rz_bv_div and rz_bv_mod. (#5742) 2026-01-07 12:26:06 +08:00
Giovanni
ea21a4a7b4
Implement colors for tables and move RzListInfo out of table.c (#5729) 2026-01-05 21:34:41 +08:00
Khairul Azhar Kasmiran
37d2e2ff41
Readd deprecated rz_list_get_next() for rz-bindgen (#5718) 2026-01-01 23:54:53 +08:00
Khairul Azhar Kasmiran
ca47373fb7
Shorten rz_list_safe_prev/next to rz_list_prev/next (#5710) 2025-12-30 22:03:11 +08:00
SSharshunov
b4160d8050
New function rz_pvector_uniq (#5705) 2025-12-30 21:07:45 +08:00
SSharshunov
fb4822d658
librz/util: new function rz_pvector_find_index (#5700) 2025-12-30 03:33:54 +08:00
Arya H R
a6edb4ecc5
Fix various Coverity findings (#5668) 2025-12-30 02:02:56 +08:00
Khairul Azhar Kasmiran
2eac3fce25
Use macro versions of rz_list_iter_get_prev/next() instead (#5696)
* Add rz_list_safe_prev/next macros
* Remove rz_list_iter_get_prev/next() functions
* Use rz_list_safe_prev() macro instead of rz_list_iter_get_prev() function
* Use rz_list_safe_next() macro instead of rz_list_iter_get_next() function
2025-12-28 21:05:49 +08:00
Khairul Azhar Kasmiran
bd29b70793
Touch up rz_list_find() doc (#5693) 2025-12-27 22:38:52 +08:00
Giovanni
5ef76f42b8
Fix small mistake on x509 structure. (#5690)
* Fix small mistake on x509 structure.
* Add test with ed25519 certificate
2025-12-27 19:00:27 +08:00
Khairul Azhar Kasmiran
edfe7d3380
rz_list_contains: Return bool instead of iter (#5692) 2025-12-27 18:59:36 +08:00
Khairul Azhar Kasmiran
c93841de48
Remove rz_list_split() and rz_list_split_iter() (#5678)
* Remove rz_list_split() and rz_list_split_iter()
* Add RZ_OWN tag to rz_list_delete()
2025-12-26 22:32:24 +08:00
Khairul Azhar Kasmiran
c1fc1419e4
Rename some rz_list funcs to rz_list_XXX_val (part 1) (#5671)
* Rename rz_list_find_ptr() to rz_list_find_val()
* Rename rz_list_delete_data() to rz_list_delete_val()
2025-12-25 22:01:49 +08:00
Rot127
472819aa92
librz/util: add in-place bitvector operations (#5569)
* Add an in-place addition of bitvectors.

* Decouple _elem_len from assumption it has just enough bytes to hold len in bits.

* Add in-place copy of bits.

* Use default copy bits bitvector function.

* Mark stack allocated bit vector.

* Add inplace variant of complement_1

* Implement inplace bitvecotr not.

* Add inplace variant of rz_bv_and

* Implement inplace variant of rz_bv_or

* Implement inplace variant of rz_bv_xor

* Constify rz_bv_lsb/msb

* Implement inplace variant of rz_bv_neg

* Fix inplace add. Add inplace SUB

* Remove prefix

* Remove invalid const

* Implement in-place casting of bit vectors.

* Add a hash test

* Fix unnecessary &

* Prevent OOB reads & writes by copying only the minimum of bytes.

* Add inplace MUL

* Add ble version for bitvector set/get with bytes.

* Add documentation for inplace bitvector functions.

* Add bench of add/sub() and sub/add_inplace().

* Remove rz_bv_copy_nbits_inplace because it was the same as rz_bv_copy_nbits.
2025-12-23 13:56:06 +08:00
Giovanni
99c1a22d69
Extend ASN.1/PKCS7/X.509 to dump structures (#5656) 2025-12-22 09:41:56 +08:00
Peiwei Hu
8ca45d1ea5
Fix the missing release of RZ_OWN parameters (#5641) 2025-12-21 13:48:48 +08:00
Khairul Azhar Kasmiran
b96202ad48
Rename rz_list_first() / rz_list_last() to rz_list_first_val() / rz_list_last_val() (#5654) 2025-12-20 17:08:59 +08:00
Giovanni
f2f26b4466
Add pF8 for decoding PKCS8 & add info on /cm (#5647) 2025-12-20 16:28:10 +08:00
Giovanni
0a0e6c0b88
Optimize queue to act also as proper channel (#5627) 2025-12-20 00:40:13 +08:00
Khairul Azhar Kasmiran
981780600e
Rename rz_str_len_utf8_ansi() to rz_str_utf8_ansi_cols() (#5649) 2025-12-19 23:01:24 +08:00
Khairul Azhar Kasmiran
f32b7cda01
rz_str_utf8_cols: Add human emoji to TODO list (#5630) 2025-12-17 23:17:24 +08:00
Khairul Azhar Kasmiran
1cdb88be5a
Rename rz_str_len_utf8() to rz_str_utf8_cols() (#5626)
* Rename rz_str_len_utf8() to rz_str_utf8_cols()
* Rename utf8strlen0() to utf8strcols0()
2025-12-16 20:09:39 +08:00
Giovanni
69e0914237
Convert opex to use RzStructuredData (#5613) 2025-12-16 15:21:44 +08:00
Khairul Azhar Kasmiran
748f849dcf
netbsd /z??: Fix wrap point for utf8 word '"и.{3}м"' when scr.columns=70 (#5608) 2025-12-11 21:51:51 +08:00
Muhammed Answar C K
d3087cc148
shell: pipe support for uniq and sort commands (#5580) 2025-12-10 19:09:30 +08:00
Arya H R
2a02208740
shell: new arg type RZ_CMD_ARG_TYPE_FOLDER (#5514)
* Added new arg type RZ_CMD_ARG_TYPE_FOLDER
* Path normalization API
* Add tests
2025-12-10 19:08:38 +08:00
Rot127
65040bb7ae
Add helper to check if a thread terminated. (#5583) 2025-12-08 04:37:01 +08:00
Anton Angelov
0a14a7a1da
Improve performance of rz_bv_set_range() (#5562)
* Add microbenchmarks

* New implementation for rz_bv_set_range()

* Remove rz_ prefix from static function names
2025-12-04 14:44:19 +08:00
Anton Angelov
9d3109888e
Enhance performance of rz_bv_copy_nbits for large to small and small to large bv copies (#5551)
* Implement optimized functions for small to large and large to small

* Add benchmark instructions in testREADME.md

* Use the term unaligned consistently instead of nonaligned

* Slightly improve bitvector test error message

* Remove unnecessary annotations

* Edit readme

* Add explicit fallthrough comments

* Return statement for rz_bv_toggle_all()

* Extend tests
2025-11-30 00:48:36 +08:00
Anton Angelov
c186f1ec83
Enhance performance of rz_bv_copy_nbits (#5541)
* Add benchmark for rz_bv_copy_nbits
* Improve performance for large to large and small to small bitvector copy
* Fix bug with nbit=64 and simplify code
* Add test for same bitvector copy
* Move bit copy logic to separate function in rz_bits.h + improve comments
* Support same vector copy for unaligned case
* Expect non-null RzTable in bench utils and add comments
* Test against reference implementation instead of hardcoded values
2025-11-23 21:52:23 +08:00
Khairul Azhar Kasmiran
4cbba6a263
rz_str_trim_tail: Declare RZ_INOUT on both parameter and return value (#5546) 2025-11-23 02:04:35 +08:00