Skip to content

Commit 6d0391c

Browse files
committed
update README.md
1 parent c6a3db7 commit 6d0391c

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ built by both clang and gcc. Some interesting perl scripts are also included.
55

66

77
## Scripts
8+
### calltree.pl: A smart tool to surf C++ source code
9+
10+
run commands to get usage of calltree.pl as follows:
11+
```
12+
calltree.pl
13+
calltree.pl help
14+
calltree.pl -h
15+
calltree.pl --help
16+
```
17+
18+
![image](./images/calltree.png)
19+
820

921
### csvtable.pl: create a ascii-border table from CSV format.
1022

calltree.pl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@ ()
189189
die "Never run calltree.pl in a directory whose depth <= 2" if scalar(@comp) <= 3;
190190
}
191191

192-
ensure_safe;
193-
ensure_ag_installed;
194-
195192
my $ignore_pattern = join "", map {" --ignore '$_' "}
196193
qw(*test* *benchmark* *CMakeFiles* *contrib/* *third_party/*
197194
*thirdparty/* *3rd-[pP]arty/* *3rd[pP]arty/* *deps/*);
@@ -1957,6 +1954,8 @@ ($)
19571954
}
19581955

19591956
sub show_tree() {
1957+
ensure_safe;
1958+
ensure_ag_installed;
19601959
($Global_calling, $Global_called, $Global_calling_names, $Global_called_names) =
19611960
get_cached_or_extract_all_funcs(%ignored, $env_trivial_threshold, $env_length_threshold);
19621961
if ($Opt_mode == 0) {
@@ -1992,7 +1991,7 @@ ()
19921991

19931992

19941993
__DATA__
1995-
<cs2>calltree.pl<end> - <cs2>A tool used to surf C++ code source.<end>
1994+
<cs2>calltree.pl<end> - <cs2>A tool used to surf C++ source code.<end>
19961995
-
19971996
- <cs2>prerequisites<end>
19981997
-- perl 5.10+: Most Linux distributions and MacOS have intalled perl 5.10+.

0 commit comments

Comments
 (0)