Lines Matching +full:out +full:- +full:functions
1 # coding=utf-8
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
47 """Extract kernel-doc comments from the specified file"""
55 'no-identifiers': directives.unchanged,
56 'functions': directives.unchanged,
62 cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno']
64 # Pass the version string to kernel-doc, as it needs to use a different
67 cmd += ['-sphinx-version', sphinx.__version__]
75 tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
78 if 'functions' in self.options:
79 self.options['identifiers'] = self.options.get('functions')
83 cmd += ['-export']
86 cmd += ['-internal']
89 cmd += ['-function', str(self.options.get('doc'))]
94 cmd += ['-function', i]
96 cmd += ['-no-doc-sections']
98 if 'no-identifiers' in self.options:
99 no_identifiers = self.options.get('no-identifiers').split()
102 cmd += ['-nosymbol', i]
107 cmd += ['-export-file', f]
113 'calling kernel-doc \'%s\'' % (" ".join(cmd)))
116 out, err = p.communicate()
118 out, err = codecs.decode(out, 'utf-8'), codecs.decode(err, 'utf-8')
124 … 'kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode))
125 return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
129 lines = statemachine.string2lines(out, tab_width, convert_whitespace=True)
133 line_regex = re.compile(r"^\.\. LINENO ([0-9]+)$")
138 lineoffset = int(match.group(1)) - 1
151 kernellog.warn(env.app, 'kernel-doc \'%s\' processing failed with: %s' %
153 return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
164 app.add_directive('kernel-doc', KernelDocDirective)