for man pages, it is helpful to know from where the man page were generated.
Showing the changes to scripts (3 of 3 files). Show all
Unified · Split
| @@ -5,8 +5,9 @@ · 4 unmodified lines | |||
| 5 | # | 5 | # |
| 6 | 6 | ||
| 7 | class KdocItem: | 7 | class KdocItem: |
| 8 | def __init__(self, name, type, start_line, **other_stuff): | 8 | def __init__(self, name, fname, type, start_line, **other_stuff): |
| 9 | self.name = name | 9 | self.name = name |
| 10 | self.fname = fname | ||
| 10 | self.type = type | 11 | self.type = type |
| 11 | self.declaration_start_line = start_line | 12 | self.declaration_start_line = start_line |
| 12 | self.sections = {} | 13 | self.sections = {} |
| @@ -630,10 +630,11 @@ class ManFormat(OutputFormat): · 629 unmodified lines | |||
| 630 | """Adds a tail for all man pages""" | 630 | """Adds a tail for all man pages""" |
| 631 | 631 | ||
| 632 | # SEE ALSO section | 632 | # SEE ALSO section |
| 633 | self.data += f'.SH "SEE ALSO"' + "\n.PP\n" | ||
| 634 | self.data += (f"Kernel file \\fB{args.fname}\\fR\n") | ||
| 633 | if len(self.symbols) >= 2: | 635 | if len(self.symbols) >= 2: |
| 634 | cur_name = self.arg_name(args, name) | 636 | cur_name = self.arg_name(args, name) |
| 635 | 637 | ||
| 636 | self.data += f'.SH "SEE ALSO"' + "\n.PP\n" | ||
| 637 | related = [] | 638 | related = [] |
| 638 | for arg in self.symbols: | 639 | for arg in self.symbols: |
| 639 | out_name = self.arg_name(arg, arg.name) | 640 | out_name = self.arg_name(arg, arg.name) |
| @@ -254,8 +254,9 @@ SECTION_DEFAULT = "Description" # default section · 253 unmodified lines | |||
| 254 | 254 | ||
| 255 | class KernelEntry: | 255 | class KernelEntry: |
| 256 | 256 | ||
| 257 | def __init__(self, config, ln): | 257 | def __init__(self, config, fname, ln): |
| 258 | self.config = config | 258 | self.config = config |
| 259 | self.fname = fname | ||
| 259 | 260 | ||
| 260 | self._contents = [] | 261 | self._contents = [] |
| 261 | self.prototype = "" | 262 | self.prototype = "" |
| @@ -422,7 +423,8 @@ class KernelDoc: · 160 unmodified lines | |||
| 422 | The actual output and output filters will be handled elsewhere | 423 | The actual output and output filters will be handled elsewhere |
| 423 | """ | 424 | """ |
| 424 | 425 | ||
| 425 | item = KdocItem(name, dtype, self.entry.declaration_start_line, **args) | 426 | item = KdocItem(name, self.fname, dtype, |
| 427 | self.entry.declaration_start_line, **args) | ||
| 426 | item.warnings = self.entry.warnings | 428 | item.warnings = self.entry.warnings |
| 427 | 429 | ||
| 428 | # Drop empty sections | 430 | # Drop empty sections |
| @@ -445,7 +447,7 @@ class KernelDoc: · 16 unmodified lines | |||
| 445 | variables used by the state machine. | 447 | variables used by the state machine. |
| 446 | """ | 448 | """ |
| 447 | 449 | ||
| 448 | self.entry = KernelEntry(self.config, ln) | 450 | self.entry = KernelEntry(self.config, self.fname, ln) |
| 449 | 451 | ||
| 450 | # State flags | 452 | # State flags |
| 451 | self.state = state.NORMAL | 453 | self.state = state.NORMAL |