On 2008-12-27 17:03:51, Vitaliy wrote: > "Gerhard Fiedler" wrote: >> These can be had with a grep-style program that supports regexps and >> searches recursively through all files in a dir tree (or with a >> simple program in Delphi that recursively parses the files in a dir >> tree and applies regexps). > > "John Chung" wrote: >> I am going to say this once. Write a shell script :) I know how you >> feel but wc is just a utility program. I doubt we can expect to >> understand asm/C src code..... > > Isn't this sort of like reinventing the wheel? :) Maybe, but maybe not. I suspect you tried some web searches with terms like "source code metrics" or so, and didn't come up with something suitable in a short time. OTOH, once you're familiar with a regexp finder, writing a shell script to do this (with some caveats, per my first message) is only a few minutes -- it may take you longer to search for, find, and try out a few such utilities until you get one that does what you want. This then maybe does what you want nicer, but it possibly doesn't save you any time... so it may really be that writing a short shell script that greps a few times through a source tree and gets you the numbers could actually be less work. This can possibly be seen as similar to a simple transistor switch. There are many ICs that incorporate many different versions of it, but you still "reinvent" it on an almost daily basis in designs. grep would be your transistor, and the few resistors you need would be the regexps you need to feed it to get what you want :) Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist