#!/bin/sh

letter="[a-zA-Z_]"
digit="[0-9]"
char="$letter|$digit"
char="[a-zA-Z0-9_]"
var="$letter""($char)*"
star="\*"
sp="[ \t]"
space="$sp""$sp*"
optspace="$sp*"

ptrvar="$var""$star?""$space""$star?""$var"
declare="$optspace""($var""$space)*""$ptrvar"
optptrvar="$var""$star?""$optspace""$star?""$var"
optdeclare="($optspace""($var""$optspace)*""$optptrvar)*"

egrep -r -n "^$declare""$optspace\(""$optdeclare" *|tr ':' ' '|grep -v "return"|awk -f size.awk|sort -r|grep -v "?"|grep -v ";"
#egrep -r -n "^$declare""$optspace\(""$optdeclare[,\)]" *|tr ':' ' '|grep -v "return"|awk -f size.awk|sort -r|grep -v "?"|grep -v ";"


