diff --git a/rc/bin/Bfn b/rc/bin/Bfn index 636aee524..907a414ee 100755 --- a/rc/bin/Bfn +++ b/rc/bin/Bfn @@ -1,9 +1,11 @@ #!/bin/rc +rfork e if(! ~ $#* 1){ echo usage: $0 fn >[2=1] exit usage } -res=`{grep -n '^'$1'\(' *.c | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' } +if(~ $#srcpath 0) srcpath=. +res=`{grep -n '^'$1'\(' $srcpath/*.c /dev/null | sed -n 's/^([^:]*:[^:]*).*$/\1/gp' } ifs=' ' for(i in $res)