NetHackWiki:Source file line numbers
Most source files in the Source namespace are marked up with line numbers. When you create a internal link to such a file, you can link to a particular line number in that file.
Source files on GitHub also have line numbers. When you create an external link, you can link to a particular line number.
Template support
The refsrc and sourcecode templates accept a line number argument. refsrc supports line numbers in both internal source files (those hosted on NetHackWiki) and external source files (those hosted on GitHub and elsewhere). sourcecode supports only internal source files.
Examples
Examples:
- Source:SLASH'EM_0.0.7E7F2/monst.c#line1373 -- monster statistics for Jumbo the Elephant
- src/uhitm.c in NetHack 3.4.3, line 1004 -- iron weapon splits a pudding
- src/mcastu.c in NetHack 3.6.7, line 383 -- hallucination protects against monster spell touch of death
Bugs
Due to a longstanding bug, source files hosted on NetHackWiki and marked with __MIXEDSYNTAXHIGHLIGHT__ do not provide line numbers. This includes most source files from: