+# `-u' limits the search to $UID.
+function pidof
+{(unset pidof
+ if [ "$1" = "-u" ];then
+ shift
+ local r="$(pidof "$@")"
+ local space=""
+ local p
+ for p in $r;do
+ if grep -q "$(echo -e "^Uid:\t$UID\t")" "/proc/$p/status";then
+ echo -n "${space}$p"
+ space=" "
+ fi
+ done
+ echo
+ else
+ pidof "$@"
+ fi
+)}
+function sumlog { find "$@" ! -name config.log -name "*.log" -o -name "*.sum"; }
+function gdbcvscheckout {(set -ex
+ test -d cvs || test -d gdb-cvs || (set +x;cvs -z3 -d :pserver:anoncvs:@sourceware.org:/cvs/src checkout gdb)
+ mv src gdb-cvs
+ cd gdb-cvs
+ (set +x;cvs update)
+ #(set +x;cvsignoresall)
+ (set +x;ignoresall)
+ );}
+function uri_escape { perl -MURI::Escape -le '$_=<>;chomp;print uri_escape $_;'; };
+function uri_unescape { perl -MURI::Escape -le '$_=<>;chomp;print uri_unescape $_;'; };