diff options
author | Jim Meyering <meyering@redhat.com> | 2008-02-05 19:27:37 +0000 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-02-05 19:27:37 +0000 |
commit | e04912a9f04a26f82f5d7711260ef15e02b4967a (patch) | |
tree | f722b767b262f8875f8266038ec008a934893e37 /docs/apibuild.py | |
parent | Ignore built test files (diff) | |
download | libvirt-e04912a9f04a26f82f5d7711260ef15e02b4967a.tar.gz libvirt-e04912a9f04a26f82f5d7711260ef15e02b4967a.tar.bz2 libvirt-e04912a9f04a26f82f5d7711260ef15e02b4967a.zip |
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.
Diffstat (limited to 'docs/apibuild.py')
-rwxr-xr-x | docs/apibuild.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/apibuild.py b/docs/apibuild.py index 429182f32..44d5e6430 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -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: |