mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-19 07:33:46 +03:00
Remove all trailing blanks; turn on the rule to detect them.
* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank. * .x-sc_trailing_blank: New file, to exempt the few binary files.
This commit is contained in:
@@ -311,7 +311,7 @@ class index:
|
||||
self.analyze_dict("structs", self.structs)
|
||||
self.analyze_dict("typedefs", self.typedefs)
|
||||
self.analyze_dict("macros", self.macros)
|
||||
|
||||
|
||||
class CLexer:
|
||||
"""A lexer for the C language, tokenize the input by reading and
|
||||
analyzing it line by line"""
|
||||
@@ -343,7 +343,7 @@ class CLexer:
|
||||
else:
|
||||
line = line + n
|
||||
return line
|
||||
|
||||
|
||||
def getlineno(self):
|
||||
return self.lineno
|
||||
|
||||
@@ -512,12 +512,12 @@ class CLexer:
|
||||
else:
|
||||
break
|
||||
self.tokens.append(('name', line[s:i]))
|
||||
|
||||
|
||||
tok = self.tokens[0]
|
||||
self.tokens = self.tokens[1:]
|
||||
self.last = tok
|
||||
return tok
|
||||
|
||||
|
||||
class CParser:
|
||||
"""The C module parser"""
|
||||
def __init__(self, filename, idx = None):
|
||||
@@ -672,7 +672,7 @@ class CParser:
|
||||
l = string.strip(l)
|
||||
desc = desc + " " + l
|
||||
del lines[0]
|
||||
|
||||
|
||||
desc = string.strip(desc)
|
||||
|
||||
if quiet == 0:
|
||||
@@ -742,7 +742,7 @@ class CParser:
|
||||
l = string.strip(l)
|
||||
desc = desc + " " + l
|
||||
del lines[0]
|
||||
|
||||
|
||||
desc = string.strip(desc)
|
||||
|
||||
if quiet == 0:
|
||||
@@ -843,7 +843,7 @@ class CParser:
|
||||
else:
|
||||
desc = desc + " " + l
|
||||
del lines[0]
|
||||
|
||||
|
||||
retdesc = string.strip(retdesc)
|
||||
desc = string.strip(desc)
|
||||
|
||||
@@ -921,7 +921,7 @@ class CParser:
|
||||
try:
|
||||
self.defines.append(apstr)
|
||||
if string.find(apstr, 'ENABLED') != -1:
|
||||
self.conditionals.append("defined(%s)" % apstr)
|
||||
self.conditionals.append("defined(%s)" % apstr)
|
||||
except:
|
||||
pass
|
||||
elif name == "#ifndef":
|
||||
@@ -929,7 +929,7 @@ class CParser:
|
||||
try:
|
||||
self.defines.append(apstr)
|
||||
if string.find(apstr, 'ENABLED') != -1:
|
||||
self.conditionals.append("!defined(%s)" % apstr)
|
||||
self.conditionals.append("!defined(%s)" % apstr)
|
||||
except:
|
||||
pass
|
||||
elif name == "#if":
|
||||
@@ -1054,7 +1054,7 @@ class CParser:
|
||||
return token
|
||||
token = self.token()
|
||||
return token
|
||||
|
||||
|
||||
#
|
||||
# Parse a C code block, used for functions it parse till
|
||||
# the balancing } included
|
||||
@@ -1089,7 +1089,7 @@ class CParser:
|
||||
elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXEN_":
|
||||
self.index_add_ref(oldtok[1], self.filename,
|
||||
0, "typedef")
|
||||
|
||||
|
||||
else:
|
||||
token = self.token()
|
||||
return token
|
||||
@@ -1222,7 +1222,7 @@ class CParser:
|
||||
if token == None:
|
||||
return token
|
||||
|
||||
while token[0] == "name" and (
|
||||
while token[0] == "name" and (
|
||||
token[1] == "const" or \
|
||||
token[1] == "unsigned" or \
|
||||
token[1] == "signed"):
|
||||
@@ -1238,7 +1238,7 @@ class CParser:
|
||||
else:
|
||||
self.type = self.type + " " + token[1]
|
||||
|
||||
# some read ahead for long long
|
||||
# some read ahead for long long
|
||||
oldtmp = token
|
||||
token = self.token()
|
||||
if token[0] == "name" and token[1] == "long":
|
||||
@@ -1263,7 +1263,7 @@ class CParser:
|
||||
self.type = tmp[1]
|
||||
else:
|
||||
self.type = self.type + " " + tmp[1]
|
||||
|
||||
|
||||
elif token[0] == "name" and token[1] == "struct":
|
||||
if self.type == "":
|
||||
self.type = token[1]
|
||||
@@ -1553,7 +1553,7 @@ class CParser:
|
||||
token = self.token()
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
return token
|
||||
|
||||
def parse(self):
|
||||
@@ -1569,7 +1569,7 @@ class CParser:
|
||||
return
|
||||
self.parseTopComment(self.top_comment)
|
||||
return self.index
|
||||
|
||||
|
||||
|
||||
class docBuilder:
|
||||
"""A documentation builder"""
|
||||
@@ -1663,7 +1663,7 @@ class docBuilder:
|
||||
self.headers[file] = None;
|
||||
self.scanHeaders()
|
||||
self.scanModules()
|
||||
|
||||
|
||||
def modulename_file(self, file):
|
||||
module = os.path.basename(file)
|
||||
if module[-2:] == '.h':
|
||||
@@ -1757,7 +1757,7 @@ class docBuilder:
|
||||
else:
|
||||
output.write(" <variable name='%s' file='%s'/>\n" % (
|
||||
name, self.modulename_file(id.header)))
|
||||
|
||||
|
||||
def serialize_function(self, output, name):
|
||||
id = self.idx.functions[name]
|
||||
if name == debugsym:
|
||||
|
Reference in New Issue
Block a user