From: Mark Wooding Date: Tue, 8 Oct 2019 10:29:17 +0000 (+0100) Subject: Merge branch '2.4.x' X-Git-Tag: 2.5.0~8 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/82fc9c74a76f4bfa7cbbb60571ec7cabafa5859f?hp=a7f4a1b8343b1b5fe645c2204d83f69172d2b63d Merge branch '2.4.x' * 2.4.x: utils/str.3: Fix typeface for mathematics. sys/tests.at: Add full stops after header comments. codec/codec.3: Fix spacing after ellipsis. utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly. utils/t/bits-testgen.py: Make `arg' return arguments in the right order. --- diff --git a/codec/codec.3 b/codec/codec.3 index 8af0f8e..fd797c5 100644 --- a/codec/codec.3 +++ b/codec/codec.3 @@ -136,7 +136,7 @@ Ignore all `junk' in the input. This should suppress almost all decoding errors. .PP If you do not set any of the -.BR CDCF_IGN ... +.BR CDCF_IGN ...\& flags, a decoder should only accept the exact encoding that the corresponding encoder would produce (with .I maxline diff --git a/sys/tests.at b/sys/tests.at index d5759bc..da79143 100644 --- a/sys/tests.at +++ b/sys/tests.at @@ -51,14 +51,14 @@ mdup=BUILDDIR/t/mdup.t AT_CHECK([$mdup 3:4]) AT_CHECK([$mdup 4:3]) -## Overlapping sources and destinations +## Overlapping sources and destinations. AT_CHECK([$mdup 4:3 3:5 5:6]) -## Repeated sources +## Repeated sources. AT_CHECK([$mdup 3:4 3:3 3:-1]) AT_CHECK([$mdup 5:8 3:4 3:5 4:6]) -## Cycles +## Cycles. AT_CHECK([$mdup 5:7 3:4 3:5 4:6 5:3]) AT_CHECK([$mdup 5:8 3:4 3:5 4:6 5:3]) diff --git a/utils/str.3 b/utils/str.3 index 13bc18f..09a6f24 100644 --- a/utils/str.3 +++ b/utils/str.3 @@ -151,7 +151,8 @@ with a zero flags word, which is the normal case. The function .B str_sanitize copies at most -.I sz \- 1 +.I sz +\- 1 characters from the string .I p to diff --git a/utils/t/bits-testgen.py b/utils/t/bits-testgen.py index 6bb9f88..05e4baf 100644 --- a/utils/t/bits-testgen.py +++ b/utils/t/bits-testgen.py @@ -12,15 +12,15 @@ WD = 64 LIMIT = 1 << WD MASK = LIMIT - 1 -SYS.argv.pop() +ARGS = SYS.argv[1:]; ARGS.reverse() def arg(default = None): - if len(SYS.argv): - return SYS.argv.pop() - else: - return default + if len(ARGS): return ARGS.pop() + else: return default R.seed(None) -SEED = int(arg(R.randrange(0, 1 << 32))) +seed = arg() +if seed is None: SEED = R.randrange(0, 1 << 32) +else: SEED = int(seed, 0) R.seed(SEED) print '### Test vectors for 64-bit arithmetic macros'