#!/bin/sh # See LICENSE file for copyright and license details. type="$1" shift 1 grep -r '\(define\s\+\(__kernel_\)\?'"$type"'\s\|typedef\s.*\s\(__kernel_\)\?'"$type"'\b\)' "$@" \ | sed 's/^\([^:]*\):/\x1b[35m\1\x1b[m /' \ | sed 's/\(__kernel_\)\?'"$type"'/\x1b[1;31m&\x1b[m/g'