source:
trunk/server/script/findstatic.pl@
751
| Last change on this file since 751 was 414, checked in by , 16 years ago | |
|---|---|
| File size: 1.5 KB | |
| Line | |
|---|---|
| 1 | #!/usr/bin/perl -w |
| 2 | # find a list of fns and variables in the code that could be static |
| 3 | # usually called with something like this: |
| 4 | # findstatic.pl `find . -name "*.o"` |
| 5 | # Andrew Tridgell <[email protected]> |
| 6 | |
| 7 | use strict; |
| 8 | |
| 9 | # use nm to find the symbols |
| 10 | my($saved_delim) = $/; |
| 11 | undef $/; |
| 12 | my($syms) = `nm -o @ARGV`; |
| 13 | $/ = $saved_delim; |
| 14 | |
| 15 | my(@lines) = split(/\n/s, $syms); |
| 16 | |
