lib: banner purge + WHY-only comment sweep (rule 8)
Every // ---- section banner dies (132 -> 0): names carry the WHAT. Narration deleted (filename restatements, run-with lines, what-the- next-line-does); every ref/hare cite, task cite, divergence, ABI/ layout contract, and ownership qualifier kept (borrowed-view lines restored where the sweep over-cut). Comment-only proven: all 442 walk-workdir .s and 32 import-probe .s byte-identical before/after; libbyteid 56-roster all-ID.
This commit is contained in:
@@ -403,8 +403,6 @@ export fn strerror(err: *error) str = {
|
||||
return r;
|
||||
};
|
||||
|
||||
// ---- help output --------------------------------------------------------
|
||||
//
|
||||
// ref/hare/getopt/getopts.ha:202-335.
|
||||
//
|
||||
// Divergences from Hare (all forced):
|
||||
@@ -447,13 +445,11 @@ fn _printusage(
|
||||
) (size | io.error) = {
|
||||
let z: size = 0;
|
||||
|
||||
// "Usage: <name>"
|
||||
match (fmt.fprint(out, "Usage:", name)) {
|
||||
case let n: size => z += n;
|
||||
case let e: io.error => return e;
|
||||
};
|
||||
|
||||
// Optional auto-[-h] + flag cluster [-Xabc].
|
||||
let startedflags: bool = false;
|
||||
if (!hascmdh) {
|
||||
match (fmt.fprint(out, " [-h")) {
|
||||
@@ -485,7 +481,6 @@ fn _printusage(
|
||||
};
|
||||
};
|
||||
|
||||
// Parameter slots [-X <name>].
|
||||
i = 0;
|
||||
for (i < help.len) {
|
||||
let p: *help = &help[i];
|
||||
@@ -571,7 +566,6 @@ export fn printhelp(
|
||||
return void;
|
||||
};
|
||||
|
||||
// Print "name: summary\n\n" if help[0] is a CMD entry.
|
||||
let p0: *help = &help[0];
|
||||
if (p0.kind == helpkind.CMD) {
|
||||
match (fmt.fprintfln(out, "{}: {}\n", name, p0.text)) {
|
||||
@@ -593,13 +587,11 @@ export fn printhelp(
|
||||
case let e: io.error => return e;
|
||||
};
|
||||
|
||||
// Blank line between usage and option list.
|
||||
match (fmt.fprint(out, "\n")) {
|
||||
case let n: size => {};
|
||||
case let e: io.error => return e;
|
||||
};
|
||||
|
||||
// Auto -h line if not declared.
|
||||
if (!hascmdh) {
|
||||
match (fmt.fprintln(out, "-h: print this help text")) {
|
||||
case let n: size => {};
|
||||
@@ -607,7 +599,6 @@ export fn printhelp(
|
||||
};
|
||||
};
|
||||
|
||||
// Per-option lines.
|
||||
let i: i32 = 0;
|
||||
for (i < help.len) {
|
||||
let p: *help = &help[i];
|
||||
|
||||
Reference in New Issue
Block a user