Hello,
I made this script to find large functions; I think it may be usefull to add at the janitorial page where the note on large functions was placed;
It assumes no things are between functions, so it gives some incorrect matches; also, it accidentilly reads some if() and switch() statements, but in some (most) cases those are actually in large functions if they show up high.
I hope this is usefull, it did find some interesting large functions like HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (dlls/dmloader/container.c) which has like 7 levels of nested switch statements
regards,
Joris
BEGIN {line_no = 0; file="";} { if ($1 != file) { if (line_no != 0 && index(file,".c") != 0) { printf("?: %s %s\n",file,var); } line_no = 0; file = $1 }
if (line_no != 0 && index(file,".c") != 0) { printf("%6d: %s %s\n",($2 - line_no),file,var); } line_no = $2
var = ""; for (i = 3; i <= NF; i++) { var = sprintf("%s%s ",var,$i); } }