Folded in from review. create.cpp built two sentences out of three M_()
fragments each:
"Home of %s(#%d) changed from " + "%s(#%d) to " + "%s(#%d)."
Three catalogue entries for one sentence is worse than leaving it unmarked,
because it looks translated while making the sentence permanently
untranslatable:
* clause order is frozen -- a translator cannot move "changed from"
relative to the subject, and languages that invert from/to or put the
verb last cannot express it at all;
* the trailing spaces are load-bearing and invisible in a PO editor, so
dropping one runs the sentence together with nothing to catch it;
* "%s(#%d) to " is not a sentence in any language and gives the translator
no context for what "to" joins;
* "%s(#%d)." and "%s(#%d) to " were shared between the home and dropto
sites, so one translation had to serve both.
Whole sentences are the point of the Phase 3 slices -- #1568's own summary
gives "makes whole sentences untranslatable as a unit" as the reason for
allowing formats at all.
Now one format each, six conversions, and the LBuf/safe_str assembly goes
away with them.
Output is unchanged; verified against a throwaway game:
Home of Thing(#3) changed from Limbo(#0) to Limbo(#0).
test-nls 570 msgids clean (down from 572: three fragments became one, twice,
and two of the fragments were shared). test-format 31744 assertions pass.
Catalogue rebuilt through `make -C mux/po mo`, which now carries msgfmt -c.
Suite 1553 passed / 0 failed / 319 of 319.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Continue Phase 3 after the rob slice: mark player/staff tprintf,
mux_sprintf, and raw_broadcast format templates with M_() so whole
sentences like "%s created as room #%d." enter the catalogue.
Left as T(): softcode machine templates ("#%d") and the ANSI color
assembly ("%s%s%s") — not notify prose. Log-only "Strange object type"
stays T() as well.
Regenerate pot/xx/mo without fuzzy entries. Format and NLS guards green.
Replace ~900 typographic \xE2\x80\x.. escapes (curly quotes, en dashes)
and a few \xE2\x80\230 octal workarounds with real UTF-8 in message
strings under mux/modules and mux/src. Leave stringutil and convert
charset mapping tables as explicit byte sequences.
Phase 2b first slice: whole-sentence notify/notify_quiet messages in
create.cpp and quota.cpp (not tprintf formats). Regenerates tinymux.pot
and expands the xx pseudo-locale so LANGUAGE=xx can exercise the new
strings. Smoke suite stays English under LANG=C.
Mechanical hygiene under the opt-in M_() design: replace T("#-1…") and
T("#-2…") with S_() so softcode ABI tokens are obvious in source and
cannot enter a player catalog. ~400 call sites across engine, exp3,
mail, and driver. Assembled/library-spliced diagnostics (plan §4.2)
are unchanged where they are not a single literal.
Completes the sweep the issue called for. mux_atol returns long, which
is 32-bit on LLP64, so every caller silently truncated on Windows. Two
of those were real defects (the truthiness family and cf_size, fixed in
the preceding commits); the rest were latent, waiting for a value large
enough to matter.
Rather than audit 290 sites for whether each can reach 2^31 today, use
the 64-bit parser everywhere and remove the class. A dbref cannot
overflow now, but nothing stops a later caller passing that same site a
timestamp or a byte count.
Pure 1:1 substitution: 285 lines changed, and every removed line
contained mux_atol while every added line contains mux_atoi64. No
control flow, no types, no behaviour beyond the wider parse.
This is a NO-OP on LP64 -- long is already 64-bit on Linux and macOS, so
the generated code there is unchanged. It only widens the parse on
Windows. Narrowing destinations are unaffected either way: `int x =
mux_atoi64(s)` truncates exactly as `int x = mux_atol(s)` did, on both
models.
Left alone: mux_atol itself in mathutil, its declaration, and three
comments that name it. Callers that genuinely want 32-bit semantics can
still ask for them; none appear to.
Verified on Windows: full solution builds clean with no new warnings,
smoke is 1418 passed / 16 failed / 0 crashes / 306 of 306 dispatched --
identical to before the sweep, with the same 16 build-configuration
failures (exp3 module not loaded, hmac/digest behind UNIX_DIGEST).
Spot checks after the change: the boolean family returns 1 for multiples
of 2^32, cf_size round-trips 3000000000 and still reads -1 as unlimited,
and arithmetic, string and list functions are unchanged.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- #1185: zero Powers/Powers2 on create_obj; require zero powers in IS_CLEAN
so freelist recycle cannot inherit privilege from corrupt garbage slots
- #1183: validate A_DESTROYER with Good_owner before destroy_player/chown_all;
fall back to GOD and log when the attribute is stale or corrupt
- #1188: refuse reverse @open when the destination is HOME with an explicit
message instead of a silent open_exit bail
Under CLONE_PRESERVE, set exit destination / room dropto directly instead
of calling link_exit(), which charged open cost, transferred ownership to
the wizard executor, and HALTed the clone.
Correctness sweep of the command-side verb handlers. Five confirmed bugs
plus a help-text correction, verified by dual-lens review and code reading
(the read-only smoke harness can't exercise these verbs directly):
- @clone/cost on an exit bypassed the "must control current location"
check (it lived only on the non-/cost path), letting a builder splice a
cloned exit into a room they do not control. (#855)
- The @mark/@mark_all/@apply_marked DB-cleaning refusal cited @unmark_all,
which does not exist (produces "Huh?"); corrected to @mark_all/clear.
(#856)
- @ps <object> reported nothing for a controlled object owned by another
player; do_ps was missing the non-player-target else clause that the
sibling @halt has (clear the owner filter). (#857)
- whisper "<quoted name>" skipped the locality/connected gate the unquoted
form applies, giving a success confirmation plus a delivery error and
polluting A_LASTWHISPER; also fixed an adjacent quoted-name continue that
did not advance the parser. (#858)
- @flag/remove of an unknown/empty flag name was silent; now reports an
error like the other flag-name failure paths. (#859)
- report help said 8-hour segments but the code uses 4 (deliberately, per
4a845139f); corrected the help. (#860)
Also restores the "## JIT / DBT Engine" CHANGES heading dropped during an
earlier 2.14.0.8 edit. Build clean, all 1264 smoke tests still pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace manual alloc_lbuf/free_lbuf pairs with LBuf RAII wrappers
in 12 engine source files: rob, walk, quota, wiz, session, object,
log, match, move, create, flags, boolexp. This eliminates ~40
explicit free_lbuf calls on error paths that are now handled by
destructors, removing leak risk in early-return and multi-exit
functions (boolexp alone had 13 exit-path frees across two
functions). Buffers returned by atr_get/atr_pget or to callers
are left manual since LBuf cannot adopt externally-allocated
buffers.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add route() softcode function with BFS-based shortest-path routing
over rooms marked NAVIGABLE. The routing table stores only the next-hop
exit for each (source, dest) pair, compressed via diagonal elimination,
adjacent marking, and row redundancy. Lazy rebuild on generation-counter
mismatch triggered by topology changes (@dig, @destroy, @link, @open,
@unlink) and NAVIGABLE flag changes. SQLite schema v10 adds route_nodes,
route_table, route_meta tables for future persistence phases.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
LogStatBuf() was defined but never called. GAME_DOOFERMUX was never
defined, making all four #ifdef blocks dead code (A_REGINFO attribute,
RegInfo table entry, registration stamp on player create, and alternate
execl argv[0]). Update smoke test expectations.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>