--- /dev/null
+#!/bin/sh
+sed 's/GNTX_EXTERN\|extern/static/g'
--- /dev/null
+#!/bin/sh
+sed 's/GNTX_STATIC\|static/extern/g'
--- /dev/null
+#!/bin/sh
+case "$(lang "$file")" in
+ C) sed 's/^/\/\//g' "$@" ;;
+ *) sed 's/^/#/g' "$@" ;;
+esac
--- /dev/null
+#!/bin/sh
+case "$(lang "$file")" in
+ C) sed 's/^\/\///g' "$@" ;;
+ *) sed 's/^#//g' "$@" ;;
+esac
--- /dev/null
+#!/bin/sh
+pattern=''
+dir='.'
+
+usage(){
+ echo "Usage: pfind DIR PATTERN [FLAGS]"
+ echo "Usage: pfind PATTERN"
+ exit 1
+}
+
+case $# in
+0) usage ;;
+1) pattern=$1; shift ;;
+*) dir=$1; shift; pattern=$1; shift ;;
+esac
+
+find "$dir" \( \( \
+ -type d -name '.svn' -o \
+ -type d -name '.git' -o \
+ -type d -iname 'build' -o \
+ -type f -name 'tags' \
+ \) -prune \
+\) -o -type f -exec grep -n --color=always "$@" "$pattern" {} +
--- /dev/null
+#!/bin/sh
+case "$(lang "$file")" in
+ ML|Python|Ruby)
+ sed 's/^/ /g' "$@" ;;
+ *) sed 's/^/ /g' "$@" ;;
+esac
--- /dev/null
+#!/bin/sh
+case "$(lang "$file")" in
+ ML|Python|Ruby)
+ sed 's/^\( \?\| \? \?\)//g' "$@" ;;
+ *) sed 's/^\( \?\| \? \? \? \?\)//g' "$@" ;;
+esac
--- /dev/null
+#!/bin/sh
+case "$1" in
+ *.c|*.cpp|*.cc|*.h|*.hpp)
+ echo "C" ;;
+ *.ml) echo "ML" ;;
+ *.py) echo "Python" ;;
+ *.rb) echo "Ruby" ;;
+ *) echo "Text" ;;
+esac
--- /dev/null
+#!/bin/sh
+sed 's_\/\/\([^\r\n]\+\)_\/*\1 *\/_g'
--- /dev/null
+#!/bin/sh
+path="$PWD"
+while [[ "$path" != "" ]]; do
+ find "$path" -maxdepth 1 -mindepth 1 "$@"
+ path="${path%/*}"
+done
--- /dev/null
+#!/bin/sh
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <dir>"
+ exit 1
+fi
+
+export PICKTITLE="Pick File ($PWD)"
+file="$(find $1 -not -path '*/\.*' -type f | sed 's|^\./||' | pick)"
+tctl "$file"
--- /dev/null
+#!/bin/sh
+ACTION="$1"
+TAGFILE="$2"
+TAG="$3"
+
+usage(){
+ echo "Usage: $0 ACTION TAGFILE [TAG]"
+ echo ""
+ echo "Actions:"
+ echo " fetch - Print the filename and line number of the selcted tag"
+ echo " print - Print the selected tag"
+ exit 1
+}
+
+if [ "" == "$TAGFILE" ] || [ "" == "$ACTION" ]; then
+ usage
+fi
+
+printtags(){
+ cat "$TAGFILE" | grep -v '^!' | cut -f1 | uniq
+}
+
+print(){
+ printf "%s" "$(printtags | pick "$TAG")"
+}
+
+fetch(){
+ if [ "" == "$TAG" ]; then
+ TAG=$(printtags | pick)
+ [ "" == "$TAG" ] && exit
+ fi
+ file=$(awk -v TAG="$TAG" '
+ BEGIN { FS = "[\t]+" }
+ ($1 == TAG) {
+ matchstr = $3
+ sub(/^\//, "\"", matchstr)
+ sub(/\$?\/;"$/, "\"", matchstr)
+ gsub(/\*/, "\\*", matchstr)
+ gsub(/(\[|\])/, "\\\1", matchstr)
+ print "grep -Hn", matchstr, $2, "| cut -d: -f1,2"
+ }
+ ' "$TAGFILE" | /bin/sh | pick)
+ [ "" != "$file" ] && tctl "$file"
+}
+
+export PICKTITLE="Pick CTag ($PWD)"
+case "$ACTION" in
+ "print") print ;;
+ "fetch") fetch ;;
+ *) usage ;;
+esac
--- /dev/null
+#!/bin/sh
+sed 's/;\r\?$/\n{\n}\n/g'
--- /dev/null
+#!/bin/sh
+sed 's/[ ]*$//g' "$@"