Filters: rename variable for compactness

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
This commit is contained in:
Michael Opdenacker 2019-12-07 07:06:09 +01:00
parent 707d9c34eb
commit 9a01c2c97a
8 changed files with 34 additions and 34 deletions

View file

@ -3,12 +3,12 @@
cppinc = []
def keep_cppinc(match):
cppinc.append(match.group(3))
return match.group(1) + '#include' + match.group(2) + '"__KEEPCPPINC__' + str(len(cppinc)) + '"'
def keep_cppinc(m):
cppinc.append(m.group(3))
return m.group(1) + '#include' + m.group(2) + '"__KEEPCPPINC__' + str(len(cppinc)) + '"'
def replace_cppinc(match):
w = cppinc[int(match.group(1)) - 1]
def replace_cppinc(m):
w = cppinc[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+os.path.dirname(path)+'/'+w+'">'+w+'</a>'
cppinc_filters = {

View file

@ -19,8 +19,8 @@ def keep_cpppathinc(m):
cpppathinc.append(inc)
return m1 + '#include' + m2 + '<__KEEPCPPPATHINC__' + str(len(cpppathinc)) + '>'
def replace_cpppathinc(match):
w = cpppathinc[int(match.group(1)) - 1]
def replace_cpppathinc(m):
w = cpppathinc[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+'/include/'+w+'">'+w+'</a>'
cpppathinc_filters = {

View file

@ -3,12 +3,12 @@
dtsi = []
def keep_dtsi(match):
dtsi.append(match.group(3))
return match.group(1) + '/include/' + match.group(2) + '"__KEEPDTSI__' + str(len(dtsi)) + '"'
def keep_dtsi(m):
dtsi.append(m.group(3))
return m.group(1) + '/include/' + m.group(2) + '"__KEEPDTSI__' + str(len(dtsi)) + '"'
def replace_dtsi(match):
w = dtsi[int(match.group(1)) - 1]
def replace_dtsi(m):
w = dtsi[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+os.path.dirname(path)+'/'+w+'">'+w+'</a>'
dtsi_filters = {

View file

@ -2,12 +2,12 @@
idents = []
def keep_idents(match):
idents.append(match.group(1))
def keep_idents(m):
idents.append(m.group(1))
return '__KEEPIDENTS__' + str(len(idents))
def replace_idents(match):
i = idents[int(match.group(1)) - 1]
def replace_idents(m):
i = idents[int(m.group(1)) - 1]
return '<a href="'+version+'/ident/'+i+'">'+i+'</a>'
ident_filters = {

View file

@ -2,12 +2,12 @@
kconfig = []
def keep_kconfig(match):
kconfig.append(match.group(4))
return match.group(1) + match.group(2) + match.group(3) + '"__KEEPKCONFIG__' + str(len(kconfig)) + '"'
def keep_kconfig(m):
kconfig.append(m.group(4))
return m.group(1) + m.group(2) + m.group(3) + '"__KEEPKCONFIG__' + str(len(kconfig)) + '"'
def replace_kconfig(match):
w = kconfig[int(match.group(1)) - 1]
def replace_kconfig(m):
w = kconfig[int(m.group(1)) - 1]
return '<a href="'+version+'/source/'+w+'">'+w+'</a>'
kconfig_filters = {

View file

@ -3,12 +3,12 @@
makefiledir = []
def keep_makefiledir(match):
makefiledir.append(match.group(1))
return '__KEEPMAKEFILEDIR__' + str(len(makefiledir)) + '/' + match.group(2)
def keep_makefiledir(m):
makefiledir.append(m.group(1))
return '__KEEPMAKEFILEDIR__' + str(len(makefiledir)) + '/' + m.group(2)
def replace_makefiledir(match):
w = makefiledir[int(match.group(1)) - 1]
def replace_makefiledir(m):
w = makefiledir[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+os.path.dirname(path)+'/'+w+'/Makefile">'+w+'/</a>'
makefiledir_filters = {

View file

@ -3,12 +3,12 @@
makefiledtb = []
def keep_makefiledtb(match):
makefiledtb.append(match.group(1))
def keep_makefiledtb(m):
makefiledtb.append(m.group(1))
return '__KEEPMAKEFILEDTB__' + str(len(makefiledtb)) + '.dtb'
def replace_makefiledtb(match):
w = makefiledtb[int(match.group(1)) - 1]
def replace_makefiledtb(m):
w = makefiledtb[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+os.path.dirname(path)+'/'+w+'.dts">'+w+'.dtb</a>'
makefiledtb_filters = {

View file

@ -3,12 +3,12 @@
makefileo = []
def keep_makefileo(match):
makefileo.append(match.group(1))
def keep_makefileo(m):
makefileo.append(m.group(1))
return '__KEEPMAKEFILEO__' + str(len(makefileo)) + '.o'
def replace_makefileo(match):
w = makefileo[int(match.group(1)) - 1]
def replace_makefileo(m):
w = makefileo[int(m.group(1)) - 1]
return '<a href="'+version+'/source'+os.path.dirname(path)+'/'+w+'.c">'+w+'.o</a>'
makefileo_filters = {