+# SunOS does not support "-m"
+export ULIMITME_OPTS=""
+for i in "-m 100000" "-d 150000" "-v 200000";do
+ (ulimit $i 2>/dev/null) && ULIMITME_OPTS="$ULIMITME_OPTS $i"
+ done
+# Prevent: ulimit: -m 100000 -d 150000 -v 200000: invalid number
+# by forcing our known $IFS value; eval(1) is needed to take $IFS to effect:
+function ulimitme { IFS=" " eval "ulimit $ULIMITME_OPTS"; }; export -f ulimitme
+function grep {(unset grep; ( ulimitme; grep "$@"; ); );}; export -f grep
+function finame { find . -false `
+ awk </dev/null 'BEGIN{ for (i=1;i<ARGC;i++) print " -o -iname *"ARGV[i]"*"; }' "$@";
+ `; }; export -f finame
+function mkcd { mkdir -p "$1"; cd "$1"; }; export -f mkcd
+function pushdmk { mkdir -p "$1"; pushd "$1"; }; export -f pushdmk
+function rsync {(unset rsync; rsync -v -e ssh --progress --stats --partial --block-size=512 "$@"; );}; export -f rsync
+function tohex { od -An -txC|tr -d '\n '|tr 'a-f' 'A-F';echo; }; export -f tohex
+function edall {
+ find -type f|while read -r i;do
+ (awk </dev/null 'BEGIN{ for (i=1;i<ARGC;i++) print ARGV[i]; }' "$@";echo -e 'w\nq')|ed -s "$i"
+ done
+ }; export -f edall
+function mi { (
+ set -ex;cd "$1";while true;do test "$PWD" != "/";if [ -e configure.in -o -e Makefile.PL ];then break;fi;cd ..;done;make install;
+ ); };export -f mi
+function ctags {(unset ctags;
+ if [ $# -ne 0 -a '(' $# -ne 1 -o "$1" '!=' "--c-types=+px" ')' ];then ctags "$@";else
+ find -name testsuite -prune -o \
+ -type f -a '!' -name tags -a '!' -name TAGS -a '(' -false \
+ -o -name "*.[chC]" \
+ -o -name "*.cc" \
+ -o -name "*.cxx" \
+ -o -name "*.java" \
+ -o -name "*.p[lm]" \
+ -o -name "*.py" \
+ ')' \
+ |ctags --file-tags -L - "$@"
+ fi; );}; export -f ctags
+function ctagsh { ctags "--c-types=+px"; }; export -f ctagsh
+function cpan {(unset cpan; if [ $# = 0 ];then cpan;else perl -MCPAN -e "install qw($*);";fi; );}; export -f cpan
+function exx { cd "`unset exx;exx "$@"|tee /proc/self/fd/2|tail -n1|sed -n 's/^extdir=//p'`"; };export -f exx
+function revlines { perl -e 'print reverse <>;'; }; export -f revlines
+function debuginfo { if test -n "$*";then echo "$*";else cat;fi \
+ |xargs rpm -qf|xargs rpmquery --qf '%{SOURCERPM}\n'|sed 's/-[^-]*-[^-]*[.]src[.]rpm$/-debuginfo/'|sort -u; }
+function ipcsrmall { ipcs|awk '/- Shared Memory/{x="-m"}/- Semaphore/{x="-s"}/^0x/{print "ipcrm "x" "$2}'; }
+function eog {(unset eog; touch /tmp/eog.$$;eog "$@" {,,,,,,,,,}/tmp/eog.$$;rm -f /tmp/eog.$$; );}; export -f eog
+function diffc { diff -u "$@"|grep -v '^\(Only in \|Binary files\)'; }; export -f diffc
+function diffi { diffc -X ~/.diffi.list "$@"; }; export -f diffi
+function cvs {(unset cvs;
+ local _opts _opts_d _now _line _o
+ if grep -iw "sources.redhat.com:/cvs/src" CVS/Root &>/dev/null;then _opts_d="";else _opts_d="-d";fi
+ _now=false
+ _line=""
+ _opts=""
+ while [ $# != 0 ];do
+ _o="$1"
+ shift
+ _line="$_line $_o"
+ if [ "$_o" = "--" ] && ! $_now;then _now=true;continue;fi
+ if [ "${_o#-}" != "$_o" ] && ! $_now;then continue;fi
+ if [ "$_o" = update -o "$_o" = upd -o "$_o" = up ];then _opts="$_opts_d";fi
+ break
+ done
+ cvs $_line $_opts "$@"
+ ); }; export -f cvs