kerneldoc.py (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) kerneldoc.py (b79dfef0e2fcf41c736e7012c59d1260aa60f075)
1# coding=utf-8
2#
3# Copyright © 2016 Intel Corporation
4#
5# Permission is hereby granted, free of charge, to any person obtaining a
6# copy of this software and associated documentation files (the "Software"),
7# to deal in the Software without restriction, including without limitation
8# the rights to use, copy, modify, merge, publish, distribute, sublicense,

--- 116 unchanged lines hidden (view full) ---

125 return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
126 elif env.config.kerneldoc_verbosity > 0:
127 sys.stderr.write(err)
128
129 lines = statemachine.string2lines(out, tab_width, convert_whitespace=True)
130 result = ViewList()
131
132 lineoffset = 0;
1# coding=utf-8
2#
3# Copyright © 2016 Intel Corporation
4#
5# Permission is hereby granted, free of charge, to any person obtaining a
6# copy of this software and associated documentation files (the "Software"),
7# to deal in the Software without restriction, including without limitation
8# the rights to use, copy, modify, merge, publish, distribute, sublicense,

--- 116 unchanged lines hidden (view full) ---

125 return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))]
126 elif env.config.kerneldoc_verbosity > 0:
127 sys.stderr.write(err)
128
129 lines = statemachine.string2lines(out, tab_width, convert_whitespace=True)
130 result = ViewList()
131
132 lineoffset = 0;
133 line_regex = re.compile("^#define LINENO ([0-9]+)$")
133 line_regex = re.compile("^\.\. LINENO ([0-9]+)$")
134 for line in lines:
135 match = line_regex.search(line)
136 if match:
137 # sphinx counts lines from 0
138 lineoffset = int(match.group(1)) - 1
139 # we must eat our comments since the upset the markup
140 else:
141 doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)

--- 29 unchanged lines hidden ---
134 for line in lines:
135 match = line_regex.search(line)
136 if match:
137 # sphinx counts lines from 0
138 lineoffset = int(match.group(1)) - 1
139 # we must eat our comments since the upset the markup
140 else:
141 doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)

--- 29 unchanged lines hidden ---