• OT: Man Pages

    From Michael Sanders@porkchop@invalid.foo to comp.lang.c on Sat Jan 3 06:11:44 2026
    From Newsgroup: comp.lang.c

    Okay, first draft of a man page. Dumped the rendered output to file via:

    MANWIDTH=74 man -l mastermind.man | col -bx > mastermind.txt

    I notice that using formatting macro '.Dt MASTERMIND 6'
    (6 being the section for games), the string 'BSD Games Manual' is added.

    I can't be too far off the mark with the man page as its rendering correctly
    in Mint/Alpine/OpenBSD uniformly. 'Nearly certain' I've covered everything
    but maybe the reader will spot something I missed...


    MASTERMIND(6) BSD Games Manual MASTERMIND(6)

    NAME
    mastermind (and Bulls & Cows via moo)

    SYNOPSIS
    mastermind [seed]

    DESCRIPTION
    mastermind is a terminal based code-breaking game. To win, guess
    the 4-digit secret code within a limited number of attempts. Visual
    feedback is given after each guess.

    If the program is named rCymoorCO or a symlink named rCymoorCO, the program
    runs in Bulls & Cows mode and prints feedback in the form rCy0B2CrCO
    (zero bulls, two cows).

    SEED
    If an 8-digit seed is supplied, it's used to regenerate the secret
    code deterministically, allowing replay of a given game.

    If no seed is provided, a seed is generated using the current time.

    In any event, on exit the seed is printed to standard error.

    KEYS
    4-digit number followed by return.

    Q Quit the game.

    H Show the help screen.

    EXAMPLES
    Play a random seed: mastermind

    Play a named seed: mastermind 67402754

    Play a seed via redirection: mastermind < seed

    Save a seed via redirection: mastermind 2>seed

    EXIT STATUS
    mastermind returns 0 on success and 1 if an error occurs.

    AUTHOR
    Michael Sanders

    BSD January 2, 2026 BSD
    --
    :wq
    Mike Sanders
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.c on Sat Jan 3 08:38:52 2026
    From Newsgroup: comp.lang.c

    On Sat, 3 Jan 2026 06:11:44 -0000 (UTC), Michael Sanders wrote:

    I can't be too far off the mark with the man page as its rendering
    correctly in Mint/Alpine/OpenBSD uniformly.

    Also worth checking how PDF output looks. This is one way to flush out
    rCL-rCY versus rCL\-rCY confusion ...
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From highcrew@high.crew3868@fastmail.com to comp.lang.c on Sat Jan 3 09:59:25 2026
    From Newsgroup: comp.lang.c

    On 1/3/26 7:11 AM, Michael Sanders wrote:
    Okay, first draft of a man page.

    I love manpages! Thank you for writing one

    On the same topic, I find basic roff a little rough, so
    I evaluated a few options over time.

    My personal rank:
    1. openbsd's "mdoc"
    2. perl POD -> pod2man
    3. asciidoc (hint: this is how git manpages are built)
    --
    High Crew
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Michael Sanders@porkchop@invalid.foo to comp.lang.c on Sat Jan 3 14:09:32 2026
    From Newsgroup: comp.lang.c

    On Sat, 3 Jan 2026 08:38:52 -0000 (UTC), Lawrence DrCOOliveiro wrote:

    On Sat, 3 Jan 2026 06:11:44 -0000 (UTC), Michael Sanders wrote:

    I can't be too far off the mark with the man page as its rendering
    correctly in Mint/Alpine/OpenBSD uniformly.

    Also worth checking how PDF output looks. This is one way to flush out rCL-rCY versus rCL\-rCY confusion ...

    Yes I certainly will check that Lawrence (didn't even know it was an issue).
    --
    :wq
    Mike Sanders
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Michael Sanders@porkchop@invalid.foo to comp.lang.c on Sat Jan 3 14:13:43 2026
    From Newsgroup: comp.lang.c

    On Sat, 3 Jan 2026 09:59:25 +0100, highcrew wrote:

    On 1/3/26 7:11 AM, Michael Sanders wrote:
    Okay, first draft of a man page.

    I love manpages! Thank you for writing one

    On the same topic, I find basic roff a little rough, so
    I evaluated a few options over time.

    My personal rank:
    1. openbsd's "mdoc"
    2. perl POD -> pod2man
    3. asciidoc (hint: this is how git manpages are built)

    Hey-hey. Oh yeah, glad to have at least dipped a toe into
    the system. Not nearly as fussy to mess around with as I'd thought.

    So what did you write your man page(s) about?
    C'mon spill the beans. =)
    --
    :wq
    Mike Sanders
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.lang.c on Sat Jan 3 18:57:21 2026
    From Newsgroup: comp.lang.c

    Michael Sanders <porkchop@invalid.foo> writes:
    Okay, first draft of a man page. Dumped the rendered output to file via:

    MANWIDTH=74 man -l mastermind.man | col -bx > mastermind.txt

    I notice that using formatting macro '.Dt MASTERMIND 6'
    (6 being the section for games), the string 'BSD Games Manual' is added.

    I can't be too far off the mark with the man page as its rendering correctly >in Mint/Alpine/OpenBSD uniformly. 'Nearly certain' I've covered everything >but maybe the reader will spot something I missed...


    MASTERMIND(6) BSD Games Manual MASTERMIND(6)

    NAME
    mastermind (and Bulls & Cows via moo)

    SYNOPSIS
    mastermind [seed]

    Generally looks pretty good. Here's an example with a table:

    $ MANWIDTH=80 man docs/manpages/vsim.man
    VSIM(1) General Commands Manual VSIM(1)

    NAME
    vsim - Burroughs Medium Systems/Unisys V-Series mainframe simulator

    SYNOPSIS
    vsim [-a architecture] [-d] [-l logfile] [-t tracefile] [-L libpath]
    [-e startup-file] [-v] [-m memsize] [-V]

    DESCRIPTION
    vsim is a simulator for the Burroughs Medium Systems (AKA the Unisys V-
    Series) mainframe computer system. It simulates the latest generation
    and supports the MCPVS 3.0 series operating systems. Some amount of
    MCPVS 2.0 support also exists, but the MCPVS 2.0 operating system is not
    available for testing.
    MCPVI, MCPIX and MCPVS 1.0 (and all prior operating systems) are not
    currently supported.

    A display device must be associated with the simulator to handle
    operator input to and output from the MCP. The t27 utility provides a
    faithful emulation of an Unisys T27 block-mode terminal. See t27(1)
    for further details. The startup command file generally specifies the
    mix of Operator Display Terminal ODT and Operator Control Station OCS
    devices connected through simulated UNILINE or Universal Console DLPs,
    which listen for a TCP connection from the t27(1) or vrje(1) utilities.

    At a minimum, an MCP disk must be defined, the number of disk (100-byte
    media) and pack (180-byte media) devices that can be defined is limited
    by the size of the Master Control Program internal device tables, the
    simulator supports 16 devices per htseq (Host Transfer Sequential) DLP
    with a maximum of 64 DLPs (which is the maximum number of channels
    supported by the MCP), for a total of 1024 disk and/or pack devices.

    OPTIONS
    -a architecture
    Specify the architecture to be used for the simulation. If not
    specified, the architecture must be specified using the so arch
    simulator command prior to executing most other commands. See
    the table below for the legal architecture names. The
    architecture name is case insensitive.

    -d Enable debug output to the trace file.

    -l logfile
    Specify the destination for log output messages from the
    simulator. If this option is not specified, the output will be
    directed to stderr.

    -t tracefile
    Specify the destination for trace (debug) output messages from
    the simulator. If this option is not specified, and processor
    tracing is enabled using the -d option or the bt family of
    simulator commands, output will be directed to stderr.

    -L libpath
    Specify the directory that contains the shared objects for the
    system I/O adapters, known as Data-Link Processors (DLPs). The
    initial bootstrap program V3SYST is also located in this
    directory and is used to bootstrap the MCP for all architecture
    types.

    -e startup-file
    This option specifies a file containing a list of simulator
    commands to run immediately after the simulator is started.
    After the final command has been executed, the simulator prompt
    will appear and the simulator is available for interactive use.
    If a command in the startup file fails, the following commands
    will not be executed. See EXAMPLES below for an example of a
    startup file. Blank lines and lines starting with the
    octothorpe character will be ignored.

    -v This flag will cause each command executed from the startup file
    specified by the -e option to be printed on the standard output
    after execution. If this flag is not set, commands executed from
    the startup file will execute silently.

    -m memsize
    The size of memory, in bytes, to assign to the simulated machine.

    -V Display the simulator version information.

    The following processor architectures are supported:
    +-----------------------------------------------------------------------------+
    | Arch CPUs Mem (Digits) Notes |
    +-----------------------------------------------------------------------------+
    | V310 1 20,000,000 No fetch/execute overlap, slower than V340 |
    | V340 1 40,000,000 No fetch/execute overlap, faster than V310 |
    | V380 1 80,000,000 F/E Overlap, B4955 w/new microcode |
    | V410 1 80,000,000 Equivalent to V340, much smaller cpu cabinet |
    | V430 1 160,000,000 Equivalent to V380, much smaller cpu cabinet |
    | V460 2 160,000,000 Two V430 processors, single cpu cabinet |
    | V480 3 160,000,000 Never built, three V430 processors |
    | V490 4 160,000,000 Never built, four V430 processors |
    | V510 1 160,000,000 Low end V500 series |
    | V530 1 320,000,000 Single Processor V500 CPU |
    | V560 2 320,000,000 Dual-processor V500 CPU, most powerful sold |
    | V580 3 640,000,000 Not shipped, three V530 CPU (Two CPU cabinets) |
    | V590 4 640,000,000 Not shipped, four V530 CPU (Two CPU cabinets |
    +-----------------------------------------------------------------------------+
    | V591 5 640,000,000 Simulator only, five V500 CPUs |
    | V592 6 640,000,000 Simulator only, six V500 CPUs |
    | V593 7 640,000,000 Simulator only, seven V500 CPUs |
    | V594 8 640,000,000 Simulator only, eight V500 CPUs |
    | V595 9 640,000,000 Simulator only, nine V500 CPUs |
    | V596 10 640,000,000 Simulator only, ten V500 CPUs |
    | V597 11 640,000,000 Simulator only, eleven V500 CPUs |
    | V598 12 640,000,000 Simulator only, twelve V500 CPUs |
    | V599 13 640,000,000 Simulator only, thirteen V500 CPUs |
    | V59A 14 640,000,000 Simulator only, fourteen V500 CPUs |
    | V59B 15 640,000,000 Simulator only, fifteen V500 CPUs |
    | V59C 16 640,000,000 Simulator only, sixteen V500 CPUs |
    +-----------------------------------------------------------------------------+

    LIMITATIONS
    While the simulator supports up to 16 processors for the V500 series
    systems, the MCP was only qualified on dual processor systems. The MCP
    is designed to support up to 16 CPU's, and will correctly schedule jobs
    on all CPUs in a 16 CPU configuration, but various commands and output
    messages will only show two or four CPU's. The system idle time
    calculations will be incorrect.

    ENVIRONMENT
    The VSIM_LIBRARY_PATH environment variable can be used to designate the
    location of the directory containing shared objects which implement
    Data-Link Processor (DLP) Input/Output functionality for the supported
    DLP devices.

    SEE ALSO
    b974, ischub, vrje, t27

    EXAMPLES
    The following is a sample startup command file for a medium-scale V380
    configuration used to coldstart the system.

    #
    # Coldstart Unit Test Configuration
    #
    # Set the maximum memory size to 80,000,000 digits
    #
    so limit 80md
    #
    # Set the architecture to V380
    #
    so arch v380
    #
    # Define the Input/Output channel configuration
    channel 1 reader
    control 1/0 load carddecks/coldstart.crd
    channel 3 buffered_printer
    control 3/0 load printers/prn_03_output
    channel 6 gcr
    control 6/0 load magtapes/mcp.tap
    control 6/1 load magtapes/cobol.tap
    control 6/2 load magtapes/cande.tap
    control 6/5 loadw magtapes/test.tap
    channel 10 odt
    control 10/4 listen 2510
    channel 15 uniline
    control 15/0 loadfw stc
    control 15/0 listen port 2515
    channel 16 htseq
    control 16/0 loadfw AD
    control 16/0 create diskpacks/206pack1.img 206S
    control 16/1 create diskpacks/682pack2.img 682S
    control 16/2 create diskpacks/207LAK0.img 207S LAK
    control 16/15 create diskpacks/207LAK1.img 207S LAK
    channel 21 punch
    control 21/0 stacker main carddecks/pch21_main.crd
    control 21/0 stacker aux carddecks/pch21_aux.crd
    control 21/0 stacker error carddecks/pch21_error.crd
    so odt 10
    so mcp 16/15
    load system
    run

    And the corresponding coldstart configuration deck for the Master
    Control Program:

    HOSTNAME SCV380
    DLP 1 CRD
    UNIT 1/0 CRD SAVED
    DLP 3 PRN
    UNIT 3/0 PRN256 PRN
    DLP 6 GCR
    UNIT 6/0 GCR
    UNIT 6/1 GCR
    UNIT 6/2 GCR
    UNIT 6/5 GCR
    DLP 10 CONSOLE
    UNIT 10/4 PRISPO ODT LEVEL 9 HLSPO AD DEF
    DLP 15 UNILINE UST3BH
    UNIT 15/0 VRJE RJE
    DLP 16 PACK HSTLAD
    PACK 16/0
    PACK 16/1
    DISK 16/2 ID 2 SUBSYSTEM 2 DEFAULT
    DISK 16/15 ID 1 SUBSYSTEM 1
    DLP 21 PCH
    UNIT 21/0 PCH
    SECURITY SYSTEM/OPERATOR DFSC
    CONTROL DEBUG MCP
    USE BOJ
    USE DCOM
    USE EOJ
    USE TPLB
    USE STOQ
    USE DUMP DISK
    USE PBD
    USE PCH
    USE SLOG AUTO 10000 WRAP
    USE RLOG AUTO 10000 WRAP
    USE ZIPM
    STOP

    October 3, 2010 VSIM(1)


    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.lang.c on Sat Jan 3 21:45:08 2026
    From Newsgroup: comp.lang.c

    On Sat, 3 Jan 2026 09:59:25 +0100, highcrew wrote:

    On the same topic, I find basic roff a little rough, so I evaluated
    a few options over time.

    My personal rank:
    1. openbsd's "mdoc"
    2. perl POD -> pod2man
    3. asciidoc (hint: this is how git manpages are built)

    Interesting, no mention of tex/latex. ;)

    I did try that once or twice, got a whole lot of warnings (and no
    usable output as I recall), couldnrCOt easily figure out what was wrong,
    gave up, went back to Markdown.

    Man pages with groff, on the other hand, have been relatively painless
    to write. I can get output that looks just like other peoplerCOs man
    pages. And I have the option for nicely-typeset output (e.g. PDF) from
    the same source, which is even nicer.

    (In fairness, I do use Mathjax in Jupyter notebooks. This is just the maths-notation subset of latex, which gives me reasonable results with
    minimal work.)
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From highcrew@high.crew3868@fastmail.com to comp.lang.c on Sun Jan 4 00:28:23 2026
    From Newsgroup: comp.lang.c

    On 1/3/26 3:13 PM, Michael Sanders wrote:
    So what did you write your man page(s) about?
    C'mon spill the beans. =)

    I wrote a bunch of man pages for open source projects
    I'm the author of.

    About perl POD, I even went as far as writing manpages
    for work. I don't expect anyone to have read it though
    :D Noobs!

    Note that Perl POD was used to write manpages for a C
    program, not for a Perl program.
    --
    High Crew
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Michael Sanders@porkchop@invalid.foo to comp.lang.c on Mon Jan 5 08:34:19 2026
    From Newsgroup: comp.lang.c

    On Sat, 03 Jan 2026 18:57:21 GMT, Scott Lurndal wrote:

    Generally looks pretty good. Here's an example with a table:

    [...]

    Thanks Scott! Interesting man page.
    --
    :wq
    Mike Sanders
    --- Synchronet 3.21a-Linux NewsLink 1.2