for man pages, it is helpful to know from where the man page were generated.
Unified · Split
| @@ -5,8 +5,9 @@ · 4 unmodified lines | ||
| 5 | 5 | # |
| 6 | 6 | |
| 7 | 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 | 9 | self.name = name |
| 10 | + self.fname = fname | |
| 10 | 11 | self.type = type |
| 11 | 12 | self.declaration_start_line = start_line |
| 12 | 13 | self.sections = {} |
| @@ -630,10 +630,11 @@ class ManFormat(OutputFormat): · 629 unmodified lines | ||
| 630 | 630 | """Adds a tail for all man pages""" |
| 631 | 631 | |
| 632 | 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 | 635 | if len(self.symbols) >= 2: |
| 634 | 636 | cur_name = self.arg_name(args, name) |
| 635 | 637 | |
| 636 | − self.data += f'.SH "SEE ALSO"' + "\n.PP\n" | |
| 637 | 638 | related = [] |
| 638 | 639 | for arg in self.symbols: |
| 639 | 640 | out_name = self.arg_name(arg, arg.name) |
| @@ -254,8 +254,9 @@ SECTION_DEFAULT = "Description" # default section · 253 unmodified lines | ||
| 254 | 254 | |
| 255 | 255 | class KernelEntry: |
| 256 | 256 | |
| 257 | − def __init__(self, config, ln): | |
| 257 | + def __init__(self, config, fname, ln): | |
| 258 | 258 | self.config = config |
| 259 | + self.fname = fname | |
| 259 | 260 | |
| 260 | 261 | self._contents = [] |
| 261 | 262 | self.prototype = "" |
| @@ -422,7 +423,8 @@ class KernelDoc: · 160 unmodified lines | ||
| 422 | 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 | 428 | item.warnings = self.entry.warnings |
| 427 | 429 | |
| 428 | 430 | # Drop empty sections |
| @@ -445,7 +447,7 @@ class KernelDoc: · 16 unmodified lines | ||
| 445 | 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 | 452 | # State flags |
| 451 | 453 | self.state = state.NORMAL |