radare2/sys/r2api.sh
radare cc8a2b84be
Introduce new R_* macros to define direction, null, defaults, etc in function signatures (#11546)
- Helps to identify some bugs at compile time
- Useful for git grep and understand the usage of the functions
- Improve readability
- Fix memleak introduced in previous anal/var pr
- Help to find unnecessary null checks and start to use r_assert
- Deprecate R_TRUFAE R_TRUE R_FALSE and R_ERROR
- Add r2api script to ease system-wide git grep for r2 devs
- Use more R_OWN and r_return_val_if_fail
2018-09-17 12:27:11 +02:00

15 lines
296 B
Bash
Executable File

#!/bin/sh
cd $HOME/prg/radare2
IFS=:
for a in $PATH ; do
if [ -x "$a/radare2" ]; then
D=$(dirname `readlink /usr/local/bin/radare2`)
cd "$D/../.."
if [ -d libr/include ]; then
git grep "$1" libr/include | grep -v '#include' | less -p "$1" -R
exit 0
fi
fi
done
echo "Cant find r2"