show_ignored

This commit is contained in:
Costa Shulyupin 2020-12-26 15:08:50 +02:00
parent be87f7dca1
commit 758dad6b58
2 changed files with 11 additions and 2 deletions

View File

@ -43,6 +43,7 @@ import xml.etree.ElementTree as ET
default_root = 'starts'
ignores = list()
show_ignored = False
level_limit = 6
lines = 0
lines_limit = 20
@ -294,11 +295,18 @@ def call_tree(node, printed=None, level=0):
local_printed = set()
for line in popen('cscope -d -L2 "%s"' % (node)):
a = line.split()[1]
if a in local_printed or a in ignores:
if a in local_printed:
continue
if a in ignores:
if show_ignored:
print_limited2((level + 1)*'\t' + '\033[2;30m' + a +
(' ^' if a in local_printed else '') +
'\033[0m')
local_printed.add(a)
continue
local_printed.add(a)
# try:
call_tree(line.split()[1], printed, level + 1)
call_tree(a, printed, level + 1)
# except Exception:
# pass

1
stop.txt Normal file
View File

@ -0,0 +1 @@
enqueue