Commit Graph

14 Commits

Author SHA1 Message Date
pancake
122c7e9df4
Fix several bugs in the RStack API ##crash 2022-06-08 19:15:48 +02:00
pancake
ab05f06287
Some random cleanups in RUtil (#16457) 2020-04-07 14:07:40 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Fangrui Song
3c79dbc019 Fix a memory leak in libr/util/stack.c 2017-07-23 14:46:15 +08:00
Lowly Worm
414608ff25 use the is_empty api call for peek 2017-06-06 00:27:50 -04:00
Lowly Worm
e4652c0319 add r_stack_peek to the stack api 2017-06-06 00:13:51 -04:00
Álvaro Felipe Melchor
87724384d1 added r_cons_break_{push/pop} to handle ^C better
Besides an UAF has been fixed afecting only ELF
2016-11-21 16:56:12 +01:00
Álvaro Felipe Melchor
44d9048169 Fix #5986 - use RStack in r_cons_push/pop
clean up cons and stack code
extend RStack to have free function
use RStack in r_cons_push/pop
2016-10-19 00:11:05 +02:00
Maijin
c274afe748 Fix #3286 - Use stdbool.h 2016-07-12 22:15:19 +02:00
pancake
991c39a601 More whitelisted auto-indented files 2015-12-08 13:24:21 +01:00
Álvaro Felipe Melchor
53badd517d Fix COVs 2015-06-17 00:22:40 +02:00
Riccardo Schirone
b279f282ba Refactoring ascii art graph
util/stack: extend stack api with r_stack_size
core/graph: use RStack instead of a custom implementation
util/graph: change implementation to use lists and extend api
core/cmd_debug: avoid free r_graph_get_nodes
core/graph: rename some functions and use typedefs for graph struct
core/graph: use RGraph for the ascii art graph
util/list: add const whenever possible
util/graph: add const on r_graph_get_nodes/neighbours
core/graph,core/cmd_debug: use const
core/graph: clean the code (add comments, use const, remove magic nums)

* use r_graph_node_iter for the current node
* reset graph when reloading nodes
* on callgraph edges printing, nth should be 0
* force seek of current node when reloading nodes
* use graph_foreach_node
* core/graph: remove get_current_node because useless
2015-06-14 00:46:11 +02:00
Riccardo Schirone
177ee3ac56 include/r_types: fix R_NEWS0 calloc usage and use it in libr/util 2015-06-12 12:48:39 +02:00
Riccardo Schirone
0b091a6c5f libr/util: implement a simple stack
libr/util/t/stack: add test
2015-06-11 22:53:47 +02:00