2
0

gen_indent.pl 307 B

123456789101112131415161718192021
  1. open O, ">.indent.pro";
  2. select O;
  3. while (<>) {
  4. open I, $_;
  5. while(<I>) {
  6. if (/([\w\d]+_t)[\s\)]/) {
  7. ##print "-T $1 ";
  8. $h{$1}++;
  9. }
  10. }
  11. close I;
  12. }
  13. print "-brs -sai -npsl -di0 -br -ce -d0 -cli0 -npcs -nfc1 -ut -i4 -ts4 -l155 -cs ";
  14. foreach (keys %h) {
  15. print "-T $_ ";
  16. }
  17. close O;