Initial commit

This commit is contained in:
2023-01-07 14:48:58 +01:00
commit 5f9eea797d
13 changed files with 1600 additions and 0 deletions

19
genf.sh Executable file
View File

@@ -0,0 +1,19 @@
# Generate multiple function arrays from man2 and man3 entries
ls /usr/share/man/man2 | sed 's/\.2.*//' | while read F; do
I=$(man 2 $F | grep '#include' | head -1 | sed 's/>.*$/>/')
if [ -z "$I" ]; then
continue
fi
i_name=$(echo $I | sed 's/.*<//;s/>.*//')
i_name_clean=$(echo $i_name | sed 's/\//_/g' | sed 's/\.h//')
# Add $f to $i_name_clean array
eval "${i_name_clean}+=(\"${F}\")"
echo "${i_name_clean}+=(\"${F}\")"
done
echo "Example output:"
echo "unistd=(${unistd[@]})"
echo "sys_uio=(${sys_uio[@]})"