docs: ASCII typography and style normalization across all repo text
Replace every em dash with real punctuation (rewrites, not hyphen swaps) in docs, code comments, scripts, configs, and the port records; convert en dashes, curly quotes, ellipsis glyphs, arrows, and section signs to ASCII; drop machine-writing tell phrases from living docs. ADR titles now use a colon. The M2 bring-up DTS model string carried an em dash into the patch series and its record echoes; fixed at both, and the full series re-verified to apply cleanly onto pristine 6.18.46. One comment in freshness.h deliberately names the em dash glyph the UI renders as the unknown mark; that is data, kept as prose naming it. Verified: cargo tests (sim, config-lint, rs485-bridge), shellcheck, both driver MC/DC harnesses, patches-apply.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
//! what it believes is /dev/ttyS4); this bridge is the wire and every slave on
|
||||
//! it. Frames are delimited by an inter-frame gap of silence: RTU's 3.5-char
|
||||
//! rule cannot survive a socket transport, so a wall-clock gap stands in for it.
|
||||
//! A mis-split frame fails CRC inside `handle_frame`, which answers `None` —
|
||||
//! exactly a real slave staying silent — and the master already treats silence
|
||||
//! A mis-split frame fails CRC inside `handle_frame`, which answers `None`
|
||||
//! (exactly a real slave staying silent), and the master already treats silence
|
||||
//! as a timeout, so the failure mode degrades to a dropped poll, never a
|
||||
//! phantom reply.
|
||||
//!
|
||||
@@ -26,7 +26,7 @@ pub const DEFAULT_GAP: Duration = Duration::from_millis(10);
|
||||
|
||||
/// Accumulation cap: a Modbus RTU ADU is at most 256 bytes, so anything past
|
||||
/// 2x that without an inter-frame gap is a misbehaving master streaming
|
||||
/// continuously — drop the buffer instead of growing without bound.
|
||||
/// continuously. Drop the buffer instead of growing without bound.
|
||||
const MAX_PENDING: usize = 512;
|
||||
|
||||
/// The shared bus: the slave plus its declared dimensions. The sim's register
|
||||
@@ -75,11 +75,11 @@ pub fn pump_serial(
|
||||
if buf.len() > MAX_PENDING {
|
||||
// Rate-limit the log and back off for one gap so a master
|
||||
// streaming continuously cannot peg a core and flood
|
||||
// stderr — mirroring the accept-loop backoff.
|
||||
// stderr, mirroring the accept-loop backoff.
|
||||
discards += 1;
|
||||
if discards == 1 || discards.is_multiple_of(256) {
|
||||
eprintln!(
|
||||
"rs485: {} bytes buffered with no inter-frame gap — \
|
||||
"rs485: {} bytes buffered with no inter-frame gap, \
|
||||
discarding (misbehaving master? {} discards so far)",
|
||||
buf.len(),
|
||||
discards
|
||||
@@ -152,7 +152,7 @@ pub fn handle_control_line(line: &str, bus: &Bus) -> String {
|
||||
return format!("err trailing arguments after '{cmd}'");
|
||||
}
|
||||
// Each arm states its own bound (bus.regs for register space, bus.bits for
|
||||
// bit space) INLINE — a previous string-keyed lookup defaulted silently to
|
||||
// bit space) INLINE: a previous string-keyed lookup defaulted silently to
|
||||
// the bit bound, which would have handed a future `get-input` command the
|
||||
// wrong range and reintroduced the out-of-range panic this check prevents.
|
||||
let mut s = bus.slave.lock().unwrap();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! control listener.
|
||||
//!
|
||||
//! Typical use (matches qemu/run.sh --rs485). Put the sockets in a private
|
||||
//! per-run directory (mktemp -d) — short (AF_UNIX caps paths at ~108 chars)
|
||||
//! per-run directory (mktemp -d): short (AF_UNIX caps paths at ~108 chars)
|
||||
//! and not guessable/pre-creatable by other local users, unlike a fixed
|
||||
//! /tmp name:
|
||||
//!
|
||||
@@ -40,7 +40,7 @@ fn main() {
|
||||
eprintln!("{name} needs a value");
|
||||
usage()
|
||||
});
|
||||
// A following flag means the value was omitted — report the real
|
||||
// A following flag means the value was omitted. Report the real
|
||||
// problem instead of swallowing the flag as a bogus value.
|
||||
if v.starts_with("--") {
|
||||
eprintln!("{name} needs a value, got flag '{v}'");
|
||||
@@ -70,7 +70,7 @@ fn main() {
|
||||
if let Some(path) = control {
|
||||
// Clear a stale socket from a previous run. A failure here that is not
|
||||
// "nothing to remove" (e.g. someone else's file behind /tmp's sticky
|
||||
// bit) will make the bind below fail — surface both errors.
|
||||
// bit) will make the bind below fail. Surface both errors.
|
||||
let removed = std::fs::remove_file(&path);
|
||||
let listener = UnixListener::bind(&path).unwrap_or_else(|e| {
|
||||
eprintln!("FATAL: cannot bind control socket {path}: {e}");
|
||||
@@ -89,7 +89,7 @@ fn main() {
|
||||
let conn = match conn {
|
||||
Ok(c) => c,
|
||||
Err(e) => {
|
||||
eprintln!("rs485: control accept failed: {e} — backing off");
|
||||
eprintln!("rs485: control accept failed: {e}, backing off");
|
||||
std::thread::sleep(Duration::from_millis(200));
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user